mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
add comm monitor for fusion stuff
This commit is contained in:
@@ -35,7 +35,7 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
|
|
||||||
protected override void SetUpDisplay()
|
protected override void SetUpDisplay()
|
||||||
{
|
{
|
||||||
//todo figure out what to do here...
|
Debug.Console(1, this, "No default Display fo this room");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetUpDisplay(DisplayBase display)
|
private void SetUpDisplay(DisplayBase display)
|
||||||
@@ -60,6 +60,20 @@ namespace PepperDash.Essentials.Core.Fusion
|
|||||||
displayAsset.PowerOn.OutputSig.UserObject = new Action<bool>(b => { if (b) display.PowerOn(); });
|
displayAsset.PowerOn.OutputSig.UserObject = new Action<bool>(b => { if (b) display.PowerOn(); });
|
||||||
displayAsset.PowerOff.OutputSig.UserObject = new Action<bool>(b => { if (b) display.PowerOff(); });
|
displayAsset.PowerOff.OutputSig.UserObject = new Action<bool>(b => { if (b) display.PowerOff(); });
|
||||||
|
|
||||||
|
if (!(display is ICommunicationMonitor))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var displayCommMonitor = display as ICommunicationMonitor;
|
||||||
|
|
||||||
|
displayAsset.Connected.InputSig.BoolValue = displayCommMonitor.CommunicationMonitor.Status ==
|
||||||
|
MonitorStatus.IsOk;
|
||||||
|
displayCommMonitor.CommunicationMonitor.StatusChange += (o, a) =>
|
||||||
|
{
|
||||||
|
displayAsset.Connected.InputSig.BoolValue = displayCommMonitor.CommunicationMonitor.Status ==
|
||||||
|
MonitorStatus.IsOk;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UsageTrackerOnDeviceUsageEnded(object sender, DeviceUsageEventArgs deviceUsageEventArgs)
|
private void UsageTrackerOnDeviceUsageEnded(object sender, DeviceUsageEventArgs deviceUsageEventArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user