mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
feat: implement ICommunicationMonitor on MobileControlTouchpanelController for Health page visibility
This commit is contained in:
parent
e23c987516
commit
1719de195f
1 changed files with 24 additions and 1 deletions
|
|
@ -25,11 +25,16 @@ namespace PepperDash.Essentials.Touchpanel
|
|||
/// Mobile Control touchpanel controller that provides app control, Zoom integration,
|
||||
/// and mobile control functionality for Crestron touchpanels.
|
||||
/// </summary>
|
||||
public class MobileControlTouchpanelController : TouchpanelBase, IHasFeedback, ITswAppControl, ITswZoomControl, IDeviceInfoProvider, IMobileControlCrestronTouchpanelController, ITheme
|
||||
public class MobileControlTouchpanelController : TouchpanelBase, IHasFeedback, ITswAppControl, ITswZoomControl, IDeviceInfoProvider, IMobileControlCrestronTouchpanelController, ITheme, ICommunicationMonitor
|
||||
{
|
||||
private readonly MobileControlTouchpanelProperties localConfig;
|
||||
private IMobileControlRoomMessenger _bridge;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the CommunicationMonitor tracking the panel's online/offline state
|
||||
/// </summary>
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
|
||||
private string _appUrl;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -128,6 +133,11 @@ namespace PepperDash.Essentials.Touchpanel
|
|||
{
|
||||
localConfig = config;
|
||||
|
||||
if (panel != null)
|
||||
{
|
||||
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, panel, 120000, 300000);
|
||||
}
|
||||
|
||||
AddPostActivationAction(SubscribeForMobileControlUpdates);
|
||||
|
||||
ThemeFeedback = new StringFeedback($"{Key}-theme", () => Theme);
|
||||
|
|
@ -366,6 +376,8 @@ namespace PepperDash.Essentials.Touchpanel
|
|||
/// </summary>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
CommunicationMonitor?.Start();
|
||||
|
||||
var appMessenger = new ITswAppControlMessenger($"appControlMessenger-{Key}", $"/device/{Key}", this);
|
||||
|
||||
var zoomMessenger = new ITswZoomControlMessenger($"zoomControlMessenger-{Key}", $"/device/{Key}", this);
|
||||
|
|
@ -393,6 +405,17 @@ namespace PepperDash.Essentials.Touchpanel
|
|||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops the CommunicationMonitor on deactivation.
|
||||
/// </summary>
|
||||
/// <returns>True if deactivation was successful; otherwise, false.</returns>
|
||||
public override bool Deactivate()
|
||||
{
|
||||
CommunicationMonitor?.Stop();
|
||||
|
||||
return base.Deactivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles device extender signal changes for system reserved signals.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue