mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19:54:59 +00:00
Fixes #362 by addressing issues with Loading IR driver as post activation action
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user