mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Merge remote-tracking branch 'origin/development' into feature/ecs-1209
This commit is contained in:
@@ -38,7 +38,13 @@ namespace PepperDash.Essentials
|
|||||||
else if (typeName == "dmdge200c")
|
else if (typeName == "dmdge200c")
|
||||||
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
|
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
|
||||||
|
|
||||||
var dgeController = new DgeController(config.Key, config.Name, dgeDevice, config, props);
|
if (dgeDevice == null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Unable to create DGE device");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dgeController = new DgeController(config.Key + "-comPorts", config.Name, dgeDevice, config, props);
|
||||||
|
|
||||||
DeviceManager.AddDevice(dgeController);
|
DeviceManager.AddDevice(dgeController);
|
||||||
|
|
||||||
|
|||||||
@@ -225,6 +225,8 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (DefaultAudioDevice is IBasicVolumeControls)
|
if (DefaultAudioDevice is IBasicVolumeControls)
|
||||||
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
||||||
@@ -233,6 +235,24 @@ namespace PepperDash.Essentials
|
|||||||
CurrentVolumeControls = DefaultVolumeControls;
|
CurrentVolumeControls = DefaultVolumeControls;
|
||||||
|
|
||||||
|
|
||||||
|
// Combines call feedback from both codecs if available
|
||||||
|
InCallFeedback = new BoolFeedback(() =>
|
||||||
|
{
|
||||||
|
bool inAudioCall = false;
|
||||||
|
bool inVideoCall = false;
|
||||||
|
|
||||||
|
if (AudioCodec != null)
|
||||||
|
inAudioCall = AudioCodec.IsInCall;
|
||||||
|
|
||||||
|
if (VideoCodec != null)
|
||||||
|
inVideoCall = VideoCodec.IsInCall;
|
||||||
|
|
||||||
|
if (inAudioCall || inVideoCall)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var disp = DefaultDisplay as DisplayBase;
|
||||||
if (disp != null)
|
if (disp != null)
|
||||||
{
|
{
|
||||||
@@ -261,9 +281,12 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
IsCoolingDownFeedback.FireUpdate();
|
IsCoolingDownFeedback.FireUpdate();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Microphone Privacy object, if any
|
|
||||||
|
|
||||||
|
// Get Microphone Privacy object, if any MUST HAPPEN AFTER setting InCallFeedback
|
||||||
this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
this.MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(PropertiesConfig, this);
|
||||||
|
|
||||||
Debug.Console(2, this, "Microphone Privacy Config evaluated.");
|
Debug.Console(2, this, "Microphone Privacy Config evaluated.");
|
||||||
@@ -273,23 +296,6 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
Debug.Console(2, this, "Emergency Config evaluated.");
|
Debug.Console(2, this, "Emergency Config evaluated.");
|
||||||
|
|
||||||
// Combines call feedback from both codecs if available
|
|
||||||
InCallFeedback = new BoolFeedback(() =>
|
|
||||||
{
|
|
||||||
bool inAudioCall = false;
|
|
||||||
bool inVideoCall = false;
|
|
||||||
|
|
||||||
if(AudioCodec != null)
|
|
||||||
inAudioCall = AudioCodec.IsInCall;
|
|
||||||
|
|
||||||
if(VideoCodec != null)
|
|
||||||
inVideoCall = VideoCodec.IsInCall;
|
|
||||||
|
|
||||||
if (inAudioCall || inVideoCall)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
|
||||||
@@ -308,6 +314,11 @@ namespace PepperDash.Essentials
|
|||||||
SourceListKey = "default";
|
SourceListKey = "default";
|
||||||
EnablePowerOnToLastSource = true;
|
EnablePowerOnToLastSource = true;
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Error Initializing Room: {0}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void CustomSetConfig(DeviceConfig config)
|
protected override void CustomSetConfig(DeviceConfig config)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,12 +30,17 @@ namespace PepperDash.Essentials
|
|||||||
tsw.SigChange += Panel_SigChange;
|
tsw.SigChange += Panel_SigChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EssentialsTouchpanelController(string key, string name, Dge100 panel, string projectName, string sgdPath)
|
public EssentialsTouchpanelController(string key, string name, Dge100 dge, string projectName, string sgdPath)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
Panel = panel;
|
Panel = dge;
|
||||||
panel.LoadSmartObjects(sgdPath);
|
|
||||||
panel.SigChange += Panel_SigChange;
|
if (!string.IsNullOrEmpty(sgdPath))
|
||||||
|
dge.LoadSmartObjects(sgdPath);
|
||||||
|
else
|
||||||
|
Debug.Console(1, this, "No SGD file path defined");
|
||||||
|
|
||||||
|
dge.SigChange += Panel_SigChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -87,7 +87,11 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
else
|
else
|
||||||
Debug.Console(0, this, "Unable to add Red LED device");
|
Debug.Console(0, this, "Unable to add Red LED device");
|
||||||
|
|
||||||
|
AddPostActivationAction(() => {
|
||||||
CheckPrivacyMode();
|
CheckPrivacyMode();
|
||||||
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
||||||
|
});
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
@@ -97,8 +101,6 @@ namespace PepperDash.Essentials.Core.Privacy
|
|||||||
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
public void SetPrivacyDevice(IPrivacy privacyDevice)
|
||||||
{
|
{
|
||||||
PrivacyDevice = privacyDevice;
|
PrivacyDevice = privacyDevice;
|
||||||
|
|
||||||
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrivacyModeIsOnFeedback_OutputChange(object sender, EventArgs e)
|
void PrivacyModeIsOnFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
// Empty the list
|
// Empty the list
|
||||||
Items.Clear();
|
Items.Clear();
|
||||||
// Clean up the SRL
|
// Clean up the SRL
|
||||||
Count = 0;
|
Count = 1;
|
||||||
|
|
||||||
ScrollToItemSig.UShortValue = 1;
|
ScrollToItemSig.UShortValue = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -747,13 +747,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
case DMInputEventIds.UsbRoutedToEventId:
|
case DMInputEventIds.UsbRoutedToEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
|
||||||
|
if(UsbInputRoutedToFeebacks[args.Number] != null)
|
||||||
UsbInputRoutedToFeebacks[args.Number].FireUpdate();
|
UsbInputRoutedToFeebacks[args.Number].FireUpdate();
|
||||||
|
else
|
||||||
|
Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.HdcpCapabilityFeedbackEventId:
|
case DMInputEventIds.HdcpCapabilityFeedbackEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
|
Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
|
||||||
|
if (InputCardHdcpCapabilityFeedbacks[args.Number] != null)
|
||||||
InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
|
InputCardHdcpCapabilityFeedbacks[args.Number].FireUpdate();
|
||||||
|
else
|
||||||
|
Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -818,6 +824,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
AudioOutputFeedbacks[output].FireUpdate();
|
AudioOutputFeedbacks[output].FireUpdate();
|
||||||
}
|
}
|
||||||
|
if (OutputAudioRouteNameFeedbacks.ContainsKey(output))
|
||||||
|
{
|
||||||
|
OutputAudioRouteNameFeedbacks[output].FireUpdate();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMOutputEventIds.OutputNameEventId:
|
case DMOutputEventIds.OutputNameEventId:
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
|||||||
public DgeController(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
|
public DgeController(string key, string name, Dge100 device, DeviceConfig dc, CrestronTouchpanelPropertiesConfig props)
|
||||||
:base(key, name, device)
|
:base(key, name, device)
|
||||||
{
|
{
|
||||||
|
DigitalGraphicsEngine = device;
|
||||||
|
|
||||||
DeviceConfig = dc;
|
DeviceConfig = dc;
|
||||||
|
|
||||||
PropertiesConfig = props;
|
PropertiesConfig = props;
|
||||||
|
|||||||
@@ -297,6 +297,10 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
else
|
else
|
||||||
Debug.Console(0, "Attempt to register relay {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey);
|
Debug.Console(0, "Attempt to register relay {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new GenericRelayDevice(key, relay);
|
||||||
|
}
|
||||||
|
|
||||||
// Future: Check if portDevice is 3-series card or other non control system that supports versiports
|
// Future: Check if portDevice is 3-series card or other non control system that supports versiports
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user