mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 20:17:03 +00:00
Fixes #362 by addressing issues with Loading IR driver as post activation action
This commit is contained in:
parent
84099b1d0b
commit
d0a2ccd7d6
2 changed files with 129 additions and 122 deletions
|
|
@ -134,7 +134,9 @@ namespace PepperDash.Essentials.Core
|
||||||
|
|
||||||
var port = irDev.IROutputPorts[portNum];
|
var port = irDev.IROutputPorts[portNum];
|
||||||
|
|
||||||
port.LoadIRDriver(Global.FilePathPrefix + "IR" + Global.DirectorySeparator + control["irFile"].Value<string>());
|
var filePath = Global.FilePathPrefix + "ir" + Global.DirectorySeparator + control["irFile"].Value<string>();
|
||||||
|
Debug.Console(1, "*************Attemting to load IR file: {0}***************", filePath);
|
||||||
|
port.LoadIRDriver(filePath);
|
||||||
|
|
||||||
return port;
|
return port;
|
||||||
|
|
||||||
|
|
@ -149,7 +151,8 @@ namespace PepperDash.Essentials.Core
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var irDevice = new IrOutputPortController(config.Key + "-irController", GetIrOutputPort, config);
|
var postActivationFunc = new Func<DeviceConfig,IROutputPort> (GetIrOutputPort);
|
||||||
|
var irDevice = new IrOutputPortController(config.Key + "-ir", postActivationFunc, config);
|
||||||
|
|
||||||
return irDevice;
|
return irDevice;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,10 @@ namespace PepperDash.Essentials.Core
|
||||||
AddPostActivationAction(() =>
|
AddPostActivationAction(() =>
|
||||||
{
|
{
|
||||||
IrPort = postActivationFunc(config);
|
IrPort = postActivationFunc(config);
|
||||||
|
if (IrPort != null)
|
||||||
|
{
|
||||||
|
DriverIsLoaded = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue