mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 22:04:52 +00:00
Corrects issue where "new" GlsOdtCCn OccSensor needed to be assigned in GlsOdtOccupancySensorController constructor for adiditional feedbacks to work correctly and not throw null ref exceptions.
This commit is contained in:
@@ -629,7 +629,7 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
|
||||
DMInput inCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
||||
DMOutput outCard = output == 0 ? null : Dmps.SwitcherOutputs[output] as Card.Dmps3OutputBase;
|
||||
DMOutput outCard = output == 0 ? null : Dmps.SwitcherOutputs[output] as DMOutput;
|
||||
|
||||
//if (inCard != null)
|
||||
//{
|
||||
@@ -638,25 +638,25 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
|
||||
//SystemControl.VideoEnter.BoolValue = true;
|
||||
if (outCard != null && outCard.VideoOut != null)
|
||||
if (outCard != null)
|
||||
outCard.VideoOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
{
|
||||
if (outCard != null && outCard.AudioOut != null)
|
||||
if (outCard != null)
|
||||
outCard.AudioOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
{
|
||||
if (outCard != null && outCard.USBRoutedTo != null)
|
||||
if (outCard != null)
|
||||
outCard.USBRoutedTo = inCard;
|
||||
}
|
||||
|
||||
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
{
|
||||
if (inCard != null && inCard.USBRoutedTo != null)
|
||||
if (inCard != null)
|
||||
inCard.USBRoutedTo = outCard;
|
||||
}
|
||||
//}
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||
public GlsOdtOccupancySensorController(string key, string name, GlsOdtCCn sensor)
|
||||
: base(key, name, sensor)
|
||||
{
|
||||
OccSensor = sensor;
|
||||
|
||||
AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue);
|
||||
|
||||
OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue);
|
||||
|
||||
Reference in New Issue
Block a user