Adds console method to print join maps at runtime. Adds overload of LinkToApi extension method for IBridge to allow passing the bridge in for JoinMapBaseAdvance applications

This commit is contained in:
Neil Dorin
2020-04-03 09:25:48 -06:00
parent bb3897160b
commit 703695e768
5 changed files with 83 additions and 8 deletions

View File

@@ -48,16 +48,17 @@ namespace PepperDash.Essentials.Core
if (joinMapSerialzed != null)
{
var joinMap = JsonConvert.DeserializeObject<Dictionary<string, JoinData>>(joinMapSerialzed);
var joinMapData = JsonConvert.DeserializeObject<Dictionary<string, JoinData>>(joinMapSerialzed);
if (joinMap != null)
return joinMap;
if (joinMapData != null)
return joinMapData;
else
return null;
}
else
return null;
}
}
/// <summary>
@@ -255,6 +256,8 @@ namespace PepperDash.Essentials.Core
Debug.Console(2, "No mathcing key found in join map for: '{0}'", customJoinData.Key);
}
}
PrintJoinMapInfo();
}
///// <summary>

View File

@@ -28,7 +28,6 @@ namespace PepperDash.Essentials.Core.Touchpanels
_Touchpanel.ButtonStateChange += new Crestron.SimplSharpPro.DeviceSupport.ButtonEventHandler(_Touchpanel_ButtonStateChange);
AddPostActivationAction(() =>
{
// Link up the button feedbacks to the specified BoolFeedbacks
@@ -40,7 +39,7 @@ namespace PepperDash.Essentials.Core.Touchpanels
{
var bKey = button.Key.ToLower();
var feedback = device.GetFeedbackProperty(feedbackConfig.BoolFeedbackName);
var feedback = device.GetFeedbackProperty(feedbackConfig.FeedbackName);
var bFeedback = feedback as BoolFeedback;
var iFeedback = feedback as IntFeedback;
@@ -72,7 +71,7 @@ namespace PepperDash.Essentials.Core.Touchpanels
}
else
{
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.BoolFeedbackName, device.Key);
Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.FeedbackName, device.Key);
}
}
else
@@ -140,6 +139,6 @@ namespace PepperDash.Essentials.Core.Touchpanels
public class KeypadButtonFeedback
{
public string DeviceKey { get; set; }
public string BoolFeedbackName { get; set; }
public string FeedbackName { get; set; }
}
}