From 03cf6ffd60c37f2650c2ad48cc3a7b523e844e6c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 22 Jul 2020 16:31:50 -0600 Subject: [PATCH] change to allow console messages to print when debugging --- PepperDashEssentials/ControlSystem.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index 57cd454e..cd9a99cb 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -53,7 +53,7 @@ namespace PepperDash.Essentials if (Debug.DoNotLoadOnNextBoot) { - CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file", + CrestronConsole.AddNewConsoleCommand(s => GoWithLoadDeferred(), "go", "Loads configuration file", ConsoleAccessLevelEnum.AccessOperator); } @@ -93,13 +93,18 @@ namespace PepperDash.Essentials if (!Debug.DoNotLoadOnNextBoot) { - GoWithLoad(); + GoWithLoad(null); return; } SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true; } + private void GoWithLoadDeferred() + { + CrestronInvoke.BeginInvoke(GoWithLoad); + } + /// /// Determines if the program is running on a processor (appliance) or server (VC-4). /// @@ -172,7 +177,7 @@ namespace PepperDash.Essentials /// /// Begins the process of loading resources including plugins and configuration data /// - public void GoWithLoad() + public void GoWithLoad(object notUsed) { try {