mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 11:15:08 +00:00
v1.0.33.* -Fixed issues with versiport configuration for pull up resistor based on feedback from Alex onsite. Corrected issue with RoomIsOccupiedFeedback_OutputChange method in EssentialsRoomBase. Updated Fusion Remote Occ sensor logic.
This commit is contained in:
@@ -177,28 +177,10 @@ namespace PepperDash.Essentials.Devices.Common
|
||||
return null;
|
||||
}
|
||||
|
||||
if (cs.SupportsDigitalInput)
|
||||
if (cs.SupportsVersiport)
|
||||
{
|
||||
if (props.PortNumber > cs.NumberOfDigitalInputPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: Cannot register DIO port {0} on {1}. Out of range",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
Debug.Console(1, "Attempting to add Digital Input device to Versiport port '{0}'", props.PortNumber);
|
||||
|
||||
DigitalInput digitalInput = cs.DigitalInputPorts[props.PortNumber];
|
||||
|
||||
if (!digitalInput.Registered)
|
||||
{
|
||||
if (digitalInput.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
return new GenericDigitalInputDevice(key, digitalInput);
|
||||
else
|
||||
Debug.Console(0, "WARNING: Attempt to register digital input {0} on device with key '{1}' failed.",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
}
|
||||
}
|
||||
else if (cs.SupportsVersiport)
|
||||
{
|
||||
if (props.PortNumber > cs.NumberOfVersiPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: Cannot add Vesiport {0} on {1}. Out of range",
|
||||
@@ -212,10 +194,9 @@ namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
var regSuccess = vp.Register();
|
||||
if (regSuccess == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
if (props.DisablePullUpResistor)
|
||||
vp.DisablePullUpResistor = true;
|
||||
return new GenericVersiportDigitalInputDevice(key, vp);
|
||||
{
|
||||
Debug.Console(1, "Successfully Created Digital Input Device on Versiport");
|
||||
return new GenericVersiportDigitalInputDevice(key, vp, props);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -225,6 +206,31 @@ namespace PepperDash.Essentials.Devices.Common
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cs.SupportsDigitalInput)
|
||||
{
|
||||
Debug.Console(1, "Attempting to add Digital Input device to Digital Input port '{0}'", props.PortNumber);
|
||||
|
||||
if (props.PortNumber > cs.NumberOfDigitalInputPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: Cannot register DIO port {0} on {1}. Out of range",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
DigitalInput digitalInput = cs.DigitalInputPorts[props.PortNumber];
|
||||
|
||||
if (!digitalInput.Registered)
|
||||
{
|
||||
if (digitalInput.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(1, "Successfully Created Digital Input Device on Digital Input");
|
||||
return new GenericDigitalInputDevice(key, digitalInput);
|
||||
}
|
||||
else
|
||||
Debug.Console(0, "WARNING: Attempt to register digital input {0} on device with key '{1}' failed.",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||
Debug.Console(1, this, "In Mock Mode: '{0}'", InTestMode);
|
||||
}
|
||||
|
||||
public void SetTestState(bool state)
|
||||
public void SetTestOccupiedState(bool state)
|
||||
{
|
||||
if (!InTestMode)
|
||||
Debug.Console(1, "Mock mode not enabled");
|
||||
|
||||
Reference in New Issue
Block a user