mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Temp commit to save progress before switching branches to debug NYU items.
This commit is contained in:
@@ -30,6 +30,8 @@ namespace PepperDash.Essentials.Core.Crestron_IO
|
|||||||
|
|
||||||
InputPort = inputPort;
|
InputPort = inputPort;
|
||||||
|
|
||||||
|
InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
|
||||||
|
|
||||||
InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange);
|
InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -39,4 +41,10 @@ namespace PepperDash.Essentials.Core.Crestron_IO
|
|||||||
InputStateFeedback.FireUpdate();
|
InputStateFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GenericVersiportInputDeviceConfigProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -116,6 +116,15 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
return new PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec(key, name, comm, props);
|
return new PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec(key, name, comm, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (typeName == "versiportinput")
|
||||||
|
{
|
||||||
|
var props = JsonConvert.DeserializeObject < PepperDash.Essentials.Core.Crestron_IO.GenericVersiportInputDeviceConfigProperties>(properties.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
//Versiport inputPort = new Versiport();
|
||||||
|
//return new PepperDash.Essentials.Core.Crestron_IO.GenericVersiportInputDevice(inputPort);
|
||||||
|
}
|
||||||
|
|
||||||
else if (groupName == "settopbox") //(typeName == "irstbbase")
|
else if (groupName == "settopbox") //(typeName == "irstbbase")
|
||||||
{
|
{
|
||||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||||
|
|||||||
@@ -11,13 +11,36 @@ using PepperDash.Essentials.Core.Crestron_IO;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.Microphones
|
namespace PepperDash.Essentials.Devices.Common.Microphones
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Used for applications where one or more microphones with momentary contact closure outputs are used to
|
||||||
|
/// toggle the privacy state of the room. Privacy state feedback is represented
|
||||||
|
/// </summary>
|
||||||
public class MicrophonePrivacyController
|
public class MicrophonePrivacyController
|
||||||
{
|
{
|
||||||
|
public bool EnableLeds
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _enableLeds;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value)
|
||||||
|
SetLedRelayStates();
|
||||||
|
else
|
||||||
|
TurnOffAllLeds();
|
||||||
|
_enableLeds = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool _enableLeds;
|
||||||
|
|
||||||
public List<IDigitalInput> Inputs { get; private set; }
|
public List<IDigitalInput> Inputs { get; private set; }
|
||||||
|
|
||||||
public GenericRelayDevice RedLedRelay { get; private set; }
|
public GenericRelayDevice RedLedRelay { get; private set; }
|
||||||
|
bool _redLedRelayState;
|
||||||
|
|
||||||
public GenericRelayDevice GreenLedRelay { get; private set; }
|
public GenericRelayDevice GreenLedRelay { get; private set; }
|
||||||
|
bool _greenLedRelayState;
|
||||||
|
|
||||||
public IPrivacy PrivacyDevice { get; private set; }
|
public IPrivacy PrivacyDevice { get; private set; }
|
||||||
|
|
||||||
@@ -89,16 +112,42 @@ namespace PepperDash.Essentials.Devices.Common.Microphones
|
|||||||
|
|
||||||
void TurnOnRedLeds()
|
void TurnOnRedLeds()
|
||||||
{
|
{
|
||||||
GreenLedRelay.OpenRelay();
|
_greenLedRelayState = false;
|
||||||
RedLedRelay.CloseRelay();
|
_redLedRelayState = true;
|
||||||
|
SetLedRelayStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurnOnGreenLeds()
|
void TurnOnGreenLeds()
|
||||||
{
|
{
|
||||||
RedLedRelay.CloseRelay();
|
_redLedRelayState = false;
|
||||||
GreenLedRelay.OpenRelay();
|
_greenLedRelayState = true;
|
||||||
|
SetLedRelayStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If enabled, sets the actual state of the relays
|
||||||
|
/// </summary>
|
||||||
|
void SetLedRelayStates()
|
||||||
|
{
|
||||||
|
if (_enableLeds)
|
||||||
|
{
|
||||||
|
if (_redLedRelayState)
|
||||||
|
RedLedRelay.CloseRelay();
|
||||||
|
else
|
||||||
|
RedLedRelay.OpenRelay();
|
||||||
|
|
||||||
|
if (_greenLedRelayState)
|
||||||
|
GreenLedRelay.CloseRelay();
|
||||||
|
else
|
||||||
|
GreenLedRelay.OpenRelay();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TurnOffAllLeds();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Turns off all LEDs
|
||||||
|
/// </summary>
|
||||||
void TurnOffAllLeds()
|
void TurnOffAllLeds()
|
||||||
{
|
{
|
||||||
GreenLedRelay.OpenRelay();
|
GreenLedRelay.OpenRelay();
|
||||||
|
|||||||
Reference in New Issue
Block a user