mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
initial pass at fixing RMC activation issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Crestron.SimplSharpPro;
|
||||
using System;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
|
||||
@@ -15,7 +16,7 @@ namespace PepperDash.Essentials.DM
|
||||
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
private readonly DmRmc100S _rmc;
|
||||
private DmRmc100S _rmc;
|
||||
|
||||
public RoutingInputPort DmIn { get; private set; }
|
||||
public RoutingOutputPort HdmiOut { get; private set; }
|
||||
@@ -32,13 +33,51 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
_rmc = rmc;
|
||||
|
||||
InitializeRouting();
|
||||
}
|
||||
|
||||
public DmRmc100SController(string key, string name, DMOutput dmOutput):base(key, name)
|
||||
{
|
||||
AddPreActivationAction(() =>
|
||||
{
|
||||
_rmc = new DmRmc100S(dmOutput);
|
||||
|
||||
SetBaseClassRmcs();
|
||||
|
||||
InitializeRouting();
|
||||
});
|
||||
}
|
||||
|
||||
public DmRmc100SController(string key, string name, uint ipId, DMOutput dmOutput) : base(key, name)
|
||||
{
|
||||
AddPreActivationAction(() =>
|
||||
{
|
||||
_rmc = new DmRmc100S(ipId, dmOutput);
|
||||
|
||||
SetBaseClassRmcs();
|
||||
|
||||
InitializeRouting();
|
||||
});
|
||||
}
|
||||
|
||||
private void SetBaseClassRmcs()
|
||||
{
|
||||
//Set Rmc in DmRmcControllerBase Class
|
||||
SetRmc(_rmc);
|
||||
|
||||
//Set Rmc In CrestronGenericBaseDevice
|
||||
SetHardwareAndRegisterEvents(_rmc);
|
||||
}
|
||||
|
||||
private void InitializeRouting()
|
||||
{
|
||||
DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.DmCat, 0, this);
|
||||
HdmiOut = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, null, this) {Port = _rmc};
|
||||
eRoutingPortConnectionType.Hdmi, null, this) { Port = _rmc };
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort> {DmIn};
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> {HdmiOut};
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort> { DmIn };
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut };
|
||||
}
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
|
||||
Reference in New Issue
Block a user