mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 13:55:05 +00:00
Wrap up Friday - null ref in RoomBase on Occ sensor event
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user