From 9a1b069e2400a84e43560f0023a703fadc06f71d Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Thu, 2 Sep 2021 08:21:37 -0500 Subject: [PATCH] feat: Added debug statements to sensor set and sensitivity methods. fix: Replaced SetSigTrueAction and SetSigFalseAction calling SetEnable state with a single SetBoolSigAction. --- .../PartitionSensor/GlsPartitionSensorController.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs index b0b58f34..bd67dfec 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PartitionSensor/GlsPartitionSensorController.cs @@ -126,6 +126,7 @@ namespace PepperDash.Essentials.Core public void SetEnableState(bool state) { + Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state); if (_partitionSensor == null) return; @@ -134,6 +135,7 @@ namespace PepperDash.Essentials.Core public void IncreaseSensitivity() { + Debug.Console(2, this, "Sensor is {0}, IncreaseSensitivity", _partitionSensor == null ? "null" : "not null"); if (_partitionSensor == null) return; @@ -142,6 +144,7 @@ namespace PepperDash.Essentials.Core public void DecreaseSensitivity() { + Debug.Console(2, this, "Sensor is {0}, DecreaseSensitivity", _partitionSensor == null ? "null" : "not null"); if (_partitionSensor == null) return; @@ -150,6 +153,7 @@ namespace PepperDash.Essentials.Core public void SetSensitivity(ushort value) { + Debug.Console(2, this, "Sensor is {0}, SetSensitivity: {1}", _partitionSensor == null ? "null" : "not null", value); if (_partitionSensor == null) return; @@ -177,8 +181,7 @@ namespace PepperDash.Essentials.Core Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name); // link input from simpl - trilist.SetSigTrueAction(joinMap.Enable.JoinNumber, () => SetEnableState(true)); - trilist.SetSigFalseAction(joinMap.Enable.JoinNumber, () => SetEnableState(false)); + trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState); trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity); trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity); trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);