Compare commits

...

3 Commits

Author SHA1 Message Date
Neil Dorin
1cf4039315 Adds logic to only instantiate screensaver if mobile control is enabled on room 2023-10-19 16:55:36 -06:00
Neil Dorin
3d15227aa2 makes RunRouteAction virtual method 2023-10-19 14:12:30 -06:00
Neil Dorin
23a37ebb37 #1145 moves LoadTieLines() to after device activation sequence 2023-10-18 15:28:22 -06:00
3 changed files with 20 additions and 12 deletions

View File

@@ -337,19 +337,20 @@ namespace PepperDash.Essentials
void Load() void Load()
{ {
LoadDevices(); LoadDevices();
LoadTieLines();
LoadRooms(); LoadRooms();
LoadLogoServer(); LoadLogoServer();
DeviceManager.ActivateAll(); DeviceManager.ActivateAll();
LoadTieLines();
var mobileControl = GetMobileControlDevice(); var mobileControl = GetMobileControlDevice();
if (mobileControl == null) return; if (mobileControl == null) return;
mobileControl.LinkSystemMonitorToAppServer(); mobileControl.LinkSystemMonitorToAppServer();
} }
/// <summary> /// <summary>
/// Reads all devices from config and adds them to DeviceManager /// Reads all devices from config and adds them to DeviceManager

View File

@@ -334,7 +334,7 @@ namespace PepperDash.Essentials
/// route or commands /// route or commands
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public void RunRouteAction(string routeKey, Action successCallback) public virtual void RunRouteAction(string routeKey, Action successCallback)
{ {
// Run this on a separate thread // Run this on a separate thread
new CTimer(o => new CTimer(o =>

View File

@@ -49,9 +49,7 @@ namespace PepperDash.Essentials
var room = DeviceManager.GetDeviceForKey(roomKey); var room = DeviceManager.GetDeviceForKey(roomKey);
if (room is IEssentialsHuddleSpaceRoom) if (room is IEssentialsHuddleSpaceRoom)
{ {
// Screen Saver Driver SetupScreenSaver(room, mainDriver);
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
// Header Driver // Header Driver
Debug.Console(0, this, "Adding header driver"); Debug.Console(0, this, "Adding header driver");
@@ -96,8 +94,7 @@ namespace PepperDash.Essentials
{ {
Debug.Console(0, this, "Adding huddle space VTC AV driver"); Debug.Console(0, this, "Adding huddle space VTC AV driver");
// Screen Saver Driver SetupScreenSaver(room, mainDriver);
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
// Header Driver // Header Driver
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _config); mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _config);
@@ -150,6 +147,16 @@ namespace PepperDash.Essentials
} }
private void SetupScreenSaver(IKeyed room, EssentialsPanelMainInterfaceDriver mainDriver)
{
var huddleRoom = room as IEssentialsRoom;
// Screen Saver Driver
if (huddleRoom.IsMobileControlEnabled)
{
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
}
}
public void LoadAndShowDriver(PanelDriverBase driver) public void LoadAndShowDriver(PanelDriverBase driver)
{ {
if (PanelDriver != null) if (PanelDriver != null)