mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Adds front panel lock control for DMPS. Cleans up system power for DMPS which doesn't do anything on 4K models
This commit is contained in:
@@ -16,6 +16,14 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
|
public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("FrontPanelLockOn")]
|
||||||
|
public JoinDataComplete FrontPanelLockOn = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "DMPS Front Panel Lock On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("FrontPanelLockOff")]
|
||||||
|
public JoinDataComplete FrontPanelLockOff = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "DMPS Front Panel Lock Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("VideoSyncStatus")]
|
[JoinName("VideoSyncStatus")]
|
||||||
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
|
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
|
||||||
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|||||||
@@ -33,9 +33,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
//IroutingNumericEvent
|
//IroutingNumericEvent
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
||||||
|
|
||||||
//Feedback for DMPS System Power
|
//Feedback for DMPS System Control
|
||||||
public BoolFeedback SystemPowerOnFeedback { get; private set; }
|
public BoolFeedback SystemPowerOnFeedback { get; private set; }
|
||||||
public BoolFeedback SystemPowerOffFeedback { get; private set; }
|
public BoolFeedback SystemPowerOffFeedback { get; private set; }
|
||||||
|
public BoolFeedback FrontPanelLockOnFeedback { get; private set; }
|
||||||
|
public BoolFeedback FrontPanelLockOffFeedback { get; private set; }
|
||||||
|
|
||||||
// Feedbacks for EssentialDM
|
// Feedbacks for EssentialDM
|
||||||
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
|
public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
|
||||||
@@ -129,6 +131,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
case eSystemControlType.Dmps34K150CSystemControl:
|
case eSystemControlType.Dmps34K150CSystemControl:
|
||||||
SystemControl = systemControl as Dmps34K150CSystemControl;
|
SystemControl = systemControl as Dmps34K150CSystemControl;
|
||||||
Dmps4kType = true;
|
Dmps4kType = true;
|
||||||
|
SystemPowerOnFeedback = new BoolFeedback(() => { return true; });
|
||||||
|
SystemPowerOffFeedback = new BoolFeedback(() => { return false; });
|
||||||
break;
|
break;
|
||||||
case eSystemControlType.Dmps34K200CSystemControl:
|
case eSystemControlType.Dmps34K200CSystemControl:
|
||||||
case eSystemControlType.Dmps34K250CSystemControl:
|
case eSystemControlType.Dmps34K250CSystemControl:
|
||||||
@@ -136,10 +140,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
case eSystemControlType.Dmps34K350CSystemControl:
|
case eSystemControlType.Dmps34K350CSystemControl:
|
||||||
SystemControl = systemControl as Dmps34K300CSystemControl;
|
SystemControl = systemControl as Dmps34K300CSystemControl;
|
||||||
Dmps4kType = true;
|
Dmps4kType = true;
|
||||||
|
SystemPowerOnFeedback = new BoolFeedback(() => { return true; });
|
||||||
|
SystemPowerOffFeedback = new BoolFeedback(() => { return false; });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SystemControl = systemControl as Dmps3SystemControl;
|
SystemControl = systemControl as Dmps3SystemControl;
|
||||||
Dmps4kType = false;
|
Dmps4kType = false;
|
||||||
|
SystemPowerOnFeedback = new BoolFeedback(() =>
|
||||||
|
{
|
||||||
|
return ((Dmps3SystemControl)SystemControl).SystemPowerOnFeedBack.BoolValue;
|
||||||
|
});
|
||||||
|
SystemPowerOffFeedback = new BoolFeedback(() =>
|
||||||
|
{
|
||||||
|
return ((Dmps3SystemControl)SystemControl).SystemPowerOffFeedBack.BoolValue;
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Debug.Console(1, this, "DMPS Type = {0}, 4K Type = {1}", systemControl.SystemControlType, Dmps4kType);
|
Debug.Console(1, this, "DMPS Type = {0}, 4K Type = {1}", systemControl.SystemControlType, Dmps4kType);
|
||||||
@@ -150,27 +164,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
TxDictionary = new Dictionary<uint, string>();
|
TxDictionary = new Dictionary<uint, string>();
|
||||||
RxDictionary = new Dictionary<uint, string>();
|
RxDictionary = new Dictionary<uint, string>();
|
||||||
|
|
||||||
SystemPowerOnFeedback = new BoolFeedback(() =>
|
FrontPanelLockOnFeedback = new BoolFeedback(() =>
|
||||||
{
|
{
|
||||||
if (SystemControl is Dmps3SystemControl)
|
return SystemControl.FrontPanelLockOnFeedback.BoolValue;
|
||||||
{
|
|
||||||
return ((Dmps3SystemControl)SystemControl).SystemPowerOnFeedBack.BoolValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
SystemPowerOffFeedback = new BoolFeedback(() =>
|
FrontPanelLockOffFeedback = new BoolFeedback(() =>
|
||||||
{
|
{
|
||||||
if (SystemControl is Dmps3SystemControl)
|
return SystemControl.FrontPanelLockOffFeedback.BoolValue;
|
||||||
{
|
|
||||||
return ((Dmps3SystemControl)SystemControl).SystemPowerOffFeedBack.BoolValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
|
||||||
@@ -237,6 +237,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
x.Value.FireUpdate();
|
x.Value.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemPowerOnFeedback.FireUpdate();
|
||||||
|
SystemPowerOffFeedback.FireUpdate();
|
||||||
|
|
||||||
|
FrontPanelLockOnFeedback.FireUpdate();
|
||||||
|
FrontPanelLockOffFeedback.FireUpdate();
|
||||||
|
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,22 +285,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
EnableRouting = enable;
|
EnableRouting = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPowerOn(bool a)
|
|
||||||
{
|
|
||||||
if (SystemControl is Dmps3SystemControl)
|
|
||||||
{
|
|
||||||
((Dmps3SystemControl)SystemControl).SystemPowerOn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetPowerOff(bool a)
|
|
||||||
{
|
|
||||||
if (SystemControl is Dmps3SystemControl)
|
|
||||||
{
|
|
||||||
((Dmps3SystemControl)SystemControl).SystemPowerOff();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
var joinMap = new DmpsRoutingControllerJoinMap(joinStart);
|
var joinMap = new DmpsRoutingControllerJoinMap(joinStart);
|
||||||
@@ -315,20 +305,22 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
//Link up system
|
//Link up system power only for non-4k DMPS3
|
||||||
trilist.SetBoolSigAction(joinMap.SystemPowerOn.JoinNumber, SetPowerOn);
|
if (SystemControl is Dmps3SystemControl)
|
||||||
trilist.SetBoolSigAction(joinMap.SystemPowerOff.JoinNumber, SetPowerOff);
|
|
||||||
if (SystemPowerOnFeedback != null)
|
|
||||||
{
|
{
|
||||||
SystemPowerOnFeedback.LinkInputSig(
|
trilist.SetBoolSigAction(joinMap.SystemPowerOn.JoinNumber, a => { if (a) { ((Dmps3SystemControl)SystemControl).SystemPowerOff(); } });
|
||||||
trilist.BooleanInput[joinMap.SystemPowerOn.JoinNumber]);
|
trilist.SetBoolSigAction(joinMap.SystemPowerOff.JoinNumber, a => { if (a) { ((Dmps3SystemControl)SystemControl).SystemPowerOff(); } });
|
||||||
}
|
|
||||||
if (SystemPowerOffFeedback != null)
|
|
||||||
{
|
|
||||||
SystemPowerOffFeedback.LinkInputSig(
|
|
||||||
trilist.BooleanInput[joinMap.SystemPowerOff.JoinNumber]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemPowerOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemPowerOn.JoinNumber]);
|
||||||
|
SystemPowerOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemPowerOff.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinMap.FrontPanelLockOn.JoinNumber, a => { if (a) {SystemControl.FrontPanelLockOn();}});
|
||||||
|
trilist.SetBoolSigAction(joinMap.FrontPanelLockOff.JoinNumber, a => { if (a) {SystemControl.FrontPanelLockOff();}});
|
||||||
|
|
||||||
|
FrontPanelLockOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FrontPanelLockOn.JoinNumber]);
|
||||||
|
FrontPanelLockOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.FrontPanelLockOff.JoinNumber]);
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.EnableRouting.JoinNumber, SetRoutingEnable);
|
trilist.SetBoolSigAction(joinMap.EnableRouting.JoinNumber, SetRoutingEnable);
|
||||||
|
|
||||||
// Link up outputs
|
// Link up outputs
|
||||||
@@ -970,15 +962,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
switch (args.EventId)
|
switch (args.EventId)
|
||||||
{
|
{
|
||||||
case DMSystemEventIds.SystemPowerOnEventId:
|
case DMSystemEventIds.SystemPowerOnEventId:
|
||||||
{
|
|
||||||
SystemPowerOnFeedback.FireUpdate();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DMSystemEventIds.SystemPowerOffEventId:
|
case DMSystemEventIds.SystemPowerOffEventId:
|
||||||
{
|
{
|
||||||
|
SystemPowerOnFeedback.FireUpdate();
|
||||||
SystemPowerOffFeedback.FireUpdate();
|
SystemPowerOffFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DMSystemEventIds.FrontPanelLockOnEventId:
|
||||||
|
case DMSystemEventIds.FrontPanelLockOffEventId:
|
||||||
|
{
|
||||||
|
FrontPanelLockOnFeedback.FireUpdate();
|
||||||
|
FrontPanelLockOffFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user