From 0fad667fabfc1fc5f1776cd6891c228254ed38e0 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Wed, 13 Sep 2023 08:56:13 -0500 Subject: [PATCH] fix: adds additional debug statements when attempting to get feedback property for device --- .../Touchpanels/Mpc3Touchpanel.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs index f1153879..296965f9 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/Mpc3Touchpanel.cs @@ -155,7 +155,7 @@ namespace PepperDash.Essentials.Core.Touchpanels return; } - Feedback deviceFeedback = null; + Feedback deviceFeedback; try { @@ -166,9 +166,16 @@ namespace PepperDash.Essentials.Core.Touchpanels key, buttonFeedback.DeviceKey); return; } + + deviceFeedback = device.GetFeedbackProperty(buttonFeedback.FeedbackName); + if (deviceFeedback == null) + { + Debug.Console(1, this, "Button '{0}' feedback failed to get feedback property for '{1}', feedback will not be implemented. Verify feedback deviceKey is properly configured.", + key, buttonFeedback.FeedbackName); + return; + } // TODO [ ] verify if this can replace the current method - deviceFeedback = device.GetFeedbackProperty(buttonFeedback.FeedbackName); //Debug.Console(0, this, "deviceFeedback.GetType().Name: '{0}'", deviceFeedback.GetType().Name); //switch (feedback.GetType().Name.ToLower()) //{