mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-30 04:44:49 +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.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput);
|
||||
|
||||
InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange);
|
||||
|
||||
}
|
||||
@@ -39,4 +41,10 @@ namespace PepperDash.Essentials.Core.Crestron_IO
|
||||
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);
|
||||
}
|
||||
|
||||
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")
|
||||
{
|
||||
var irCont = IRPortHelper.GetIrOutputPortController(dc);
|
||||
|
||||
@@ -11,13 +11,36 @@ using PepperDash.Essentials.Core.Crestron_IO;
|
||||
|
||||
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 bool EnableLeds
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enableLeds;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
SetLedRelayStates();
|
||||
else
|
||||
TurnOffAllLeds();
|
||||
_enableLeds = value;
|
||||
}
|
||||
}
|
||||
bool _enableLeds;
|
||||
|
||||
public List<IDigitalInput> Inputs { get; private set; }
|
||||
|
||||
public GenericRelayDevice RedLedRelay { get; private set; }
|
||||
bool _redLedRelayState;
|
||||
|
||||
public GenericRelayDevice GreenLedRelay { get; private set; }
|
||||
bool _greenLedRelayState;
|
||||
|
||||
public IPrivacy PrivacyDevice { get; private set; }
|
||||
|
||||
@@ -89,16 +112,42 @@ namespace PepperDash.Essentials.Devices.Common.Microphones
|
||||
|
||||
void TurnOnRedLeds()
|
||||
{
|
||||
GreenLedRelay.OpenRelay();
|
||||
RedLedRelay.CloseRelay();
|
||||
_greenLedRelayState = false;
|
||||
_redLedRelayState = true;
|
||||
SetLedRelayStates();
|
||||
}
|
||||
|
||||
void TurnOnGreenLeds()
|
||||
{
|
||||
RedLedRelay.CloseRelay();
|
||||
GreenLedRelay.OpenRelay();
|
||||
_redLedRelayState = false;
|
||||
_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()
|
||||
{
|
||||
GreenLedRelay.OpenRelay();
|
||||
|
||||
Reference in New Issue
Block a user