From 4da2f25c3d57aa867dac162ae6a8e4812eae5dc1 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Fri, 27 Oct 2023 12:14:07 -0500 Subject: [PATCH] fix: list available buttons on startup --- .../Touchpanels/Mpc3Touchpanel.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs index 2f6074dd..44a758f8 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs @@ -55,6 +55,8 @@ namespace PepperDash.Essentials.Core.Touchpanels InitializeButton(buttonKey, buttonConfig); InitializeButtonFeedback(buttonKey, buttonConfig); } + + ListButtons(); }); } @@ -318,6 +320,23 @@ namespace PepperDash.Essentials.Core.Touchpanels foreach (var eventType in button.EventTypes[type]) DeviceJsonApi.DoDeviceAction(eventType); } + + + public void ListButtons() + { + var line = new string('-', 35); + + Debug.Console(0, this, line); + + Debug.Console(0, this, "MPC3 Controller {0} - Available Butons", Key); + + foreach (var button in _buttons) + { + Debug.Console(0, this, "Key: {0}", button.Key); + } + + Debug.Console(0, this, line); + } } ///