Merge pull request #540 from PepperDash/hotfix/dge-devinfo-issues

Hotfix/dge devinfo issues
This commit is contained in:
Neil Dorin
2021-01-07 15:25:53 -07:00
committed by GitHub
2 changed files with 366 additions and 352 deletions

View File

@@ -39,12 +39,12 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
{ {
_dge = device; _dge = device;
_dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs; _dgeEthernetInfo = _dge.ExtenderEthernetReservedSigs;
_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo(); //_dgeEthernetInfo.DeviceExtenderSigChange += (extender, args) => UpdateDeviceInfo();
_dgeEthernetInfo.Use(); _dgeEthernetInfo.Use();
DeviceInfo = new DeviceInfo(); DeviceInfo = new DeviceInfo();
_dge.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); }; //_dge.OnlineStatusChange += (currentDevice, args) => { if (args.DeviceOnLine) UpdateDeviceInfo(); };
_dc = dc; _dc = dc;

View File

@@ -259,29 +259,35 @@ namespace PepperDash.Essentials.DM
{ {
case 0: case 0:
{ {
ExecuteSwitch(eVst.Auto, null, eRoutingSignalType.Audio | eRoutingSignalType.Video); ExecuteSwitch(eVst.Auto, null, type);
break; break;
} }
case 1: case 1:
{ {
ExecuteSwitch(HdmiIn1.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video); ExecuteSwitch(HdmiIn1.Selector, null, type);
break; break;
} }
case 2: case 2:
{ {
ExecuteSwitch(HdmiIn2.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video); ExecuteSwitch(HdmiIn2.Selector, null, type);
break; break;
} }
case 3: case 3:
{ {
ExecuteSwitch(DisplayPortIn.Selector, null, eRoutingSignalType.Audio | eRoutingSignalType.Video); ExecuteSwitch(DisplayPortIn.Selector, null, type);
break; break;
} }
case 4: case 4:
{ {
ExecuteSwitch(eVst.AllDisabled, null, eRoutingSignalType.Audio | eRoutingSignalType.Video); ExecuteSwitch(eVst.AllDisabled, null, type);
break; break;
} }
default:
{
Debug.Console(2, this, "Unable to execute numeric switch to input {0}", input);
break;
}
} }
@@ -289,15 +295,23 @@ namespace PepperDash.Essentials.DM
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType) public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
{ {
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video) try
Tx.VideoSource = (eVst)inputSelector; {
Debug.Console(2, this, "Attempting to switch InputSelector {0}", ((eVst)inputSelector).ToString());
if ((signalType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
Tx.VideoSource = (eVst)inputSelector;
// NOTE: It's possible that this particular TX model may not like the AudioSource property being set. // NOTE: It's possible that this particular TX model may not like the AudioSource property being set.
// The SIMPL definition only shows a single analog for AudioVideo Source // The SIMPL definition only shows a single analog for AudioVideo Source
if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio) if ((signalType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
//it doesn't //it doesn't
Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key); Debug.Console(2, this, "Unable to execute audio-only switch for tx {0}", Key);
//Tx.AudioSource = (eAst)inputSelector; //Tx.AudioSource = (eAst)inputSelector;
}
catch (Exception e)
{
Debug.Console(2, this, "Exception in ExecuteSwitch: {0}", e);
}
} }
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)