mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +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;
|
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)
|
//if (inCard != null)
|
||||||
//{
|
//{
|
||||||
@@ -638,25 +638,25 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
|
|
||||||
//SystemControl.VideoEnter.BoolValue = true;
|
//SystemControl.VideoEnter.BoolValue = true;
|
||||||
if (outCard != null && outCard.VideoOut != null)
|
if (outCard != null)
|
||||||
outCard.VideoOut = inCard;
|
outCard.VideoOut = inCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
{
|
{
|
||||||
if (outCard != null && outCard.AudioOut != null)
|
if (outCard != null)
|
||||||
outCard.AudioOut = inCard;
|
outCard.AudioOut = inCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
{
|
{
|
||||||
if (outCard != null && outCard.USBRoutedTo != null)
|
if (outCard != null)
|
||||||
outCard.USBRoutedTo = inCard;
|
outCard.USBRoutedTo = inCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||||
{
|
{
|
||||||
if (inCard != null && inCard.USBRoutedTo != null)
|
if (inCard != null)
|
||||||
inCard.USBRoutedTo = outCard;
|
inCard.USBRoutedTo = outCard;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
|||||||
public GlsOdtOccupancySensorController(string key, string name, GlsOdtCCn sensor)
|
public GlsOdtOccupancySensorController(string key, string name, GlsOdtCCn sensor)
|
||||||
: base(key, name, sensor)
|
: base(key, name, sensor)
|
||||||
{
|
{
|
||||||
|
OccSensor = sensor;
|
||||||
|
|
||||||
AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue);
|
AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue);
|
||||||
|
|
||||||
OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue);
|
OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue);
|
||||||
|
|||||||
Reference in New Issue
Block a user