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:
Neil Dorin
2018-01-22 16:37:27 -07:00
parent b83b3737e9
commit b85abe1b79
10 changed files with 81 additions and 43 deletions

View File

@@ -26,19 +26,25 @@ namespace PepperDash.Essentials.Core.CrestronIO
}
}
public GenericVersiportDigitalInputDevice(string key, Versiport inputPort):
public GenericVersiportDigitalInputDevice(string key, Versiport inputPort, IOPortConfig props):
base(key)
{
InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc);
InputPort = inputPort;
InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
if (props.DisablePullUpResistor)
InputPort.DisablePullUpResistor = true;
InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange);
Debug.Console(1, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", props.PortNumber, InputPort.DisablePullUpResistor);
}
void InputPort_VersiportChange(Versiport port, VersiportEventArgs args)
{
Debug.Console(1, this, "Versiport change: {0}", args.Event);
InputStateFeedback.FireUpdate();
if(args.Event == eVersiportEvent.DigitalInChange)
InputStateFeedback.FireUpdate();
}
}
}

View File

@@ -40,11 +40,13 @@ namespace PepperDash.Essentials.Core
{
Debug.Console(0, this, "Activating");
var response = Hardware.RegisterWithLogging(Key);
if (response == eDeviceRegistrationUnRegistrationResponse.Success)
if (response != eDeviceRegistrationUnRegistrationResponse.Success)
{
Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange);
CommunicationMonitor.Start();
Debug.Console(0, this, "ERROR: Cannot register Crestron device: {0}", response);
return false;
}
Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange);
CommunicationMonitor.Start();
return true;
}

View File

@@ -63,10 +63,17 @@ namespace PepperDash.Essentials.Core
public static void ActivateAll()
{
foreach (var d in Devices.Values)
{
if (d is Device)
(d as Device).Activate();
}
{
try
{
if (d is Device)
(d as Device).Activate();
}
catch (Exception e)
{
Debug.Console(0, d, "ERROR: Device activation failure:\r{0}", e);
}
}
}
/// <summary>