mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 12:15:01 +00:00
Adds debug statement to Hardware_OnlineStatusChange callback to help figure out issues with devices not reporting online status correctly. Removes IsRegistered from Feedbacks and fires update manually.
This commit is contained in:
@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
else
|
else
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
});
|
});
|
||||||
AddToFeedbackList(IsOnline, IsRegistered, IpConnectionsText);
|
AddToFeedbackList(IsOnline, IpConnectionsText);
|
||||||
|
|
||||||
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
|
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,10 @@ namespace PepperDash.Essentials.Core
|
|||||||
//Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
//Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IsRegistered.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var f in Feedbacks)
|
foreach (var f in Feedbacks)
|
||||||
{
|
{
|
||||||
f.FireUpdate();
|
f.FireUpdate();
|
||||||
@@ -90,7 +93,11 @@ namespace PepperDash.Essentials.Core
|
|||||||
CommunicationMonitor.Stop();
|
CommunicationMonitor.Stop();
|
||||||
Hardware.OnlineStatusChange -= Hardware_OnlineStatusChange;
|
Hardware.OnlineStatusChange -= Hardware_OnlineStatusChange;
|
||||||
|
|
||||||
return Hardware.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
var success = Hardware.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
||||||
|
|
||||||
|
IsRegistered.FireUpdate();
|
||||||
|
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -113,14 +120,12 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args)
|
||||||
{
|
{
|
||||||
//if (args.DeviceOnLine)
|
Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine);
|
||||||
//{
|
foreach (var feedback in Feedbacks)
|
||||||
foreach (var feedback in Feedbacks)
|
{
|
||||||
{
|
if (feedback != null)
|
||||||
if (feedback != null)
|
feedback.FireUpdate();
|
||||||
feedback.FireUpdate();
|
}
|
||||||
}
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IStatusMonitor Members
|
#region IStatusMonitor Members
|
||||||
|
|||||||
Reference in New Issue
Block a user