mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix: GlsPartitionSensorController class replaced trilist.SetSigTrue/False actions used to enable the sensor with SetBoolSigAction. Added debug statements @ level 2 for Set methods.
This commit is contained in:
parent
d6878df267
commit
4919f275c0
1 changed files with 9 additions and 6 deletions
|
|
@ -135,6 +135,7 @@ namespace PepperDash.Essentials.Core
|
||||||
|
|
||||||
public void SetEnableState(bool state)
|
public void SetEnableState(bool state)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2,this, "SetEnableState: state = {0} | _partitionSensor is {1}", state, _partitionSensor == null ? "null" : "not null");
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -143,6 +144,7 @@ namespace PepperDash.Essentials.Core
|
||||||
|
|
||||||
public void IncreaseSensitivity()
|
public void IncreaseSensitivity()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "IncreaseSensitivity: _partitionSensor is {0}", _partitionSensor == null ? "null" : "not null");
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -151,6 +153,7 @@ namespace PepperDash.Essentials.Core
|
||||||
|
|
||||||
public void DecreaseSensitivity()
|
public void DecreaseSensitivity()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, this, "DecreaseSensitivity: _partitionSensor is {0}", _partitionSensor == null ? "null" : "not null");
|
||||||
if (_partitionSensor == null)
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -158,8 +161,9 @@ namespace PepperDash.Essentials.Core
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSensitivity(ushort value)
|
public void SetSensitivity(ushort value)
|
||||||
{
|
{
|
||||||
if (_partitionSensor == null)
|
Debug.Console(2, this, "SetSensitivity: value = {0} | _partitionSensor is {1}", value, _partitionSensor == null ? "null" : "not null");
|
||||||
|
if (_partitionSensor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_partitionSensor.Sensitivity.UShortValue = value;
|
_partitionSensor.Sensitivity.UShortValue = value;
|
||||||
|
|
@ -186,8 +190,7 @@ namespace PepperDash.Essentials.Core
|
||||||
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
||||||
|
|
||||||
// link input from simpl
|
// link input from simpl
|
||||||
trilist.SetSigTrueAction(joinMap.Enable.JoinNumber, () => SetEnableState(true));
|
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
|
||||||
trilist.SetSigFalseAction(joinMap.Enable.JoinNumber, () => SetEnableState(false));
|
|
||||||
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
||||||
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
||||||
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
||||||
|
|
@ -244,8 +247,8 @@ namespace PepperDash.Essentials.Core
|
||||||
Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey);
|
Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey);
|
||||||
return new GlsPartCn(cresnetId, Global.ControlSystem);
|
return new GlsPartCn(cresnetId, Global.ControlSystem);
|
||||||
}
|
}
|
||||||
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches;
|
|
||||||
|
|
||||||
|
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches;
|
||||||
if (cresnetBridge != null)
|
if (cresnetBridge != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey);
|
Debug.Console(0, "Device {0} is a valid cresnet master - creating new GlsPartCn", parentKey);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue