Wrap up Friday - null ref in RoomBase on Occ sensor event

This commit is contained in:
Heath Volmer
2018-01-22 11:31:23 -07:00
parent 6f028c06ae
commit cb41b31018
18 changed files with 57103 additions and 9477 deletions

View File

@@ -38,16 +38,14 @@ namespace PepperDash.Essentials.Core
/// </summary>
public override bool CustomActivate()
{
new CTimer(o =>
Debug.Console(0, this, "Activating");
var response = Hardware.RegisterWithLogging(Key);
if (response == eDeviceRegistrationUnRegistrationResponse.Success)
{
Debug.Console(1, this, "Activating");
var response = Hardware.RegisterWithLogging(Key);
if (response == eDeviceRegistrationUnRegistrationResponse.Success)
{
Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange);
CommunicationMonitor.Start();
}
}, 0);
Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange);
CommunicationMonitor.Start();
}
return true;
}