Waits to return InitializeSystem until devices are registered. Adds DMPS system power on/off to device bridge.

This commit is contained in:
Alex Johnson
2021-09-23 12:01:15 -04:00
parent 3d543dfd09
commit bead782bd5
4 changed files with 124 additions and 19 deletions

View File

@@ -28,9 +28,11 @@ namespace PepperDash.Essentials.Core
public static List<IKeyed> AllDevices { get { return new List<IKeyed>(Devices.Values); } }
public static bool AddDeviceEnabled;
public static bool AllDevicesActivatedFb;
public static void Initialize(CrestronControlSystem cs)
{
AllDevicesActivatedFb = false;
AddDeviceEnabled = true;
CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices",
ConsoleAccessLevelEnum.AccessOperator);
@@ -122,6 +124,7 @@ namespace PepperDash.Essentials.Core
private static void OnAllDevicesActivated()
{
AllDevicesActivatedFb = true;
var handler = AllDevicesActivated;
if (handler != null)
{