mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Fixed issue where a remote would not run its preactivation activtion against an internal gateway
Resolves #320
This commit is contained in:
parent
044a259f0b
commit
cdf876cb5a
1 changed files with 20 additions and 15 deletions
|
|
@ -22,6 +22,7 @@ namespace PepperDash.Essentials.Core
|
||||||
public class Hrxx0WirelessRemoteController : EssentialsBridgeableDevice, IHasFeedback
|
public class Hrxx0WirelessRemoteController : EssentialsBridgeableDevice, IHasFeedback
|
||||||
{
|
{
|
||||||
private CenRfgwController _gateway;
|
private CenRfgwController _gateway;
|
||||||
|
private GatewayBase _gatewayBase;
|
||||||
|
|
||||||
private Hr1x0WirelessRemoteBase _remote;
|
private Hr1x0WirelessRemoteBase _remote;
|
||||||
|
|
||||||
|
|
@ -43,27 +44,31 @@ namespace PepperDash.Essentials.Core
|
||||||
var rfId = (uint)props.Control.InfinetIdInt;
|
var rfId = (uint)props.Control.InfinetIdInt;
|
||||||
_config = config;
|
_config = config;
|
||||||
|
|
||||||
GatewayBase gateway;
|
|
||||||
|
|
||||||
if (props.GatewayDeviceKey == "processor")
|
if (props.GatewayDeviceKey == "processor")
|
||||||
{
|
{
|
||||||
gateway = Global.ControlSystem.ControllerRFGatewayDevice;
|
{
|
||||||
|
AddPreActivationAction(() =>
|
||||||
|
{
|
||||||
|
_remote = preActivationFunc(config);
|
||||||
|
RegisterEvents();
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
|
||||||
|
var gatewayDev = DeviceManager.GetDeviceForKey(props.GatewayDeviceKey) as CenRfgwController;
|
||||||
|
if (gatewayDev == null)
|
||||||
{
|
{
|
||||||
var gatewayDev = DeviceManager.GetDeviceForKey(props.GatewayDeviceKey) as CenRfgwController;
|
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is not a valid device", props.GatewayDeviceKey);
|
||||||
if (gatewayDev == null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is not a valid device", props.GatewayDeviceKey);
|
|
||||||
}
|
|
||||||
if (gatewayDev != null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is a valid device", props.GatewayDeviceKey);
|
|
||||||
gateway = gatewayDev.GateWay;
|
|
||||||
_gateway = gatewayDev;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (gatewayDev != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is a valid device", props.GatewayDeviceKey);
|
||||||
|
_gateway = gatewayDev;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (_gateway == null) return;
|
if (_gateway == null) return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue