ecs-649, exceptions on boot with call connected

This commit is contained in:
Heath Volmer
2017-11-20 16:07:45 -07:00
parent 4d6a680f23
commit 19860be486
13 changed files with 21221 additions and 319 deletions

View File

@@ -73,7 +73,7 @@
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.1.26313, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.1.26313, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -4,5 +4,4 @@
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PepperDashEssentialsBase")] [assembly: AssemblyProduct("PepperDashEssentialsBase")]
[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyVersion("1.0.0.*")] [assembly: AssemblyVersion("1.0.3.*")]

View File

@@ -55,9 +55,9 @@
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath> <HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.DM.dll</HintPath>
</Reference> </Reference>
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.0.15153, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.1.20241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -4,5 +4,4 @@
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Essentials_DM")] [assembly: AssemblyProduct("Essentials_DM")]
[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyVersion("1.0.0.*")] [assembly: AssemblyVersion("1.0.3.*")]

View File

@@ -59,9 +59,9 @@
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll</HintPath> <HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll</HintPath>
</Reference> </Reference>
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.6284.20368, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.1.20241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -4,5 +4,4 @@
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Essentials_Devices_Common")] [assembly: AssemblyProduct("Essentials_Devices_Common")]
[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyVersion("1.0.0.*")] [assembly: AssemblyVersion("1.0.3.*")]

File diff suppressed because it is too large Load Diff

View File

@@ -75,9 +75,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\pepperdash-portal-sync\SspPortalSync\SspPortalSync\bin\PepperDashCorePortalSync.dll</HintPath> <HintPath>..\..\..\pepperdash-portal-sync\SspPortalSync\SspPortalSync\bin\PepperDashCorePortalSync.dll</HintPath>
</Reference> </Reference>
<Reference Include="PepperDash_Core, Version=1.0.1.26313, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.1.20241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="PepperDash_Essentials_DM, Version=1.0.0.19343, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Essentials_DM, Version=1.0.0.19343, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -4,5 +4,5 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyProduct("PepperDashEssentials")]
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
[assembly: AssemblyVersion("1.0.2.*")] [assembly: AssemblyVersion("1.0.5.*")]

View File

@@ -1,267 +1,267 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials; using PepperDash.Essentials;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.SmartObjects; using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.Touchpanels.Keyboards; using PepperDash.Essentials.Core.Touchpanels.Keyboards;
using PepperDash.Essentials.Devices.Displays; using PepperDash.Essentials.Devices.Displays;
using PepperDash.Essentials.Room.Config; using PepperDash.Essentials.Room.Config;
namespace PepperDash.Essentials.UIDrivers namespace PepperDash.Essentials.UIDrivers
{ {
public class EssentialsHuddleTechPageDriver : PanelDriverBase public class EssentialsHuddleTechPageDriver : PanelDriverBase
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
SmartObjectDynamicList MenuList; SmartObjectDynamicList MenuList;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
SubpageReferenceList StatusList; SubpageReferenceList StatusList;
/// <summary> /// <summary>
/// The list of display controls /// The list of display controls
/// </summary> /// </summary>
SubpageReferenceList DisplayList; SubpageReferenceList DisplayList;
/// <summary> /// <summary>
/// References lines in the list against device instances /// References lines in the list against device instances
/// </summary> /// </summary>
Dictionary<ICommunicationMonitor, uint> StatusListDeviceIndexes; Dictionary<ICommunicationMonitor, uint> StatusListDeviceIndexes;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
JoinedSigInterlock PagesInterlock; JoinedSigInterlock PagesInterlock;
/// <summary> /// <summary>
/// 1 /// 1
/// </summary> /// </summary>
public const uint JoinText = 1; public const uint JoinText = 1;
CTimer PinAuthorizedTimer; CTimer PinAuthorizedTimer;
EssentialsRoomTechConfig Config; EssentialsRoomTechConfig Config;
StringBuilder PinEntryBuilder = new StringBuilder(4); StringBuilder PinEntryBuilder = new StringBuilder(4);
bool IsAuthorized; bool IsAuthorized;
SmartObjectNumeric PinKeypad; SmartObjectNumeric PinKeypad;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="trilist"></param> /// <param name="trilist"></param>
/// <param name="parent"></param> /// <param name="parent"></param>
public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, EssentialsRoomTechConfig config) public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, EssentialsRoomTechConfig config)
: base(trilist) : base(trilist)
{ {
Config = config; Config = config;
PagesInterlock = new JoinedSigInterlock(trilist); PagesInterlock = new JoinedSigInterlock(trilist);
PagesInterlock.SetButDontShow(UIBoolJoin.TechSystemStatusVisible); PagesInterlock.SetButDontShow(UIBoolJoin.TechSystemStatusVisible);
trilist.SetSigFalseAction(UIBoolJoin.TechExitButton, Hide); trilist.SetSigFalseAction(UIBoolJoin.TechExitButton, Hide);
MenuList = new SmartObjectDynamicList(trilist.SmartObjects[UISmartObjectJoin.TechMenuList], MenuList = new SmartObjectDynamicList(trilist.SmartObjects[UISmartObjectJoin.TechMenuList],
true, 3100); true, 3100);
MenuList.SetFeedback(1, true); // initial fb MenuList.SetFeedback(1, true); // initial fb
MenuList.SetItemMainText(1, "System Status"); MenuList.SetItemMainText(1, "System Status");
MenuList.SetItemButtonAction(1, b => { MenuList.SetItemButtonAction(1, b => {
if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechSystemStatusVisible); if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechSystemStatusVisible);
MenuList.SetFeedback(1, true); MenuList.SetFeedback(1, true);
}); });
MenuList.SetItemMainText(2, "Display Controls"); MenuList.SetItemMainText(2, "Display Controls");
MenuList.SetItemButtonAction(2, b => { MenuList.SetItemButtonAction(2, b => {
if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechDisplayControlsVisible); if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechDisplayControlsVisible);
MenuList.SetFeedback(2, true); MenuList.SetFeedback(2, true);
}); });
MenuList.SetItemMainText(3, "Panel Setup"); MenuList.SetItemMainText(3, "Panel Setup");
MenuList.SetItemButtonAction(3, b => { MenuList.SetItemButtonAction(3, b => {
if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechPanelSetupVisible); if (b) PagesInterlock.ShowInterlocked(UIBoolJoin.TechPanelSetupVisible);
MenuList.SetFeedback(3, true); MenuList.SetFeedback(3, true);
}); });
MenuList.Count = 3; MenuList.Count = 3;
BuildStatusList(); BuildStatusList();
BuildDisplayList(); BuildDisplayList();
SetupPinModal(); SetupPinModal();
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public override void Show() public override void Show()
{ {
// divert to PIN if we need auth // divert to PIN if we need auth
if (IsAuthorized) if (IsAuthorized)
{ {
// Cancel the auth timer so we don't deauth after coming back in // Cancel the auth timer so we don't deauth after coming back in
if (PinAuthorizedTimer != null) if (PinAuthorizedTimer != null)
PinAuthorizedTimer.Stop(); PinAuthorizedTimer.Stop();
TriList.SetBool(UIBoolJoin.TechCommonItemsVisbible, true); TriList.SetBool(UIBoolJoin.TechCommonItemsVisbible, true);
PagesInterlock.Show(); PagesInterlock.Show();
base.Show(); base.Show();
} }
else else
{ {
TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, true); TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, true);
} }
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public override void Hide() public override void Hide()
{ {
// Leave it authorized for 60 seconds. // Leave it authorized for 60 seconds.
if (IsAuthorized) if (IsAuthorized)
PinAuthorizedTimer = new CTimer(o => { PinAuthorizedTimer = new CTimer(o => {
IsAuthorized = false; IsAuthorized = false;
PinAuthorizedTimer = null; PinAuthorizedTimer = null;
}, 60000); }, 60000);
TriList.SetBool(UIBoolJoin.TechCommonItemsVisbible, false); TriList.SetBool(UIBoolJoin.TechCommonItemsVisbible, false);
PagesInterlock.Hide(); PagesInterlock.Hide();
base.Hide(); base.Hide();
} }
/// <summary> /// <summary>
/// Wire up the keypad and buttons /// Wire up the keypad and buttons
/// </summary> /// </summary>
void SetupPinModal() void SetupPinModal()
{ {
TriList.SetSigFalseAction(UIBoolJoin.PinDialogCancelPress, CancelPinDialog); TriList.SetSigFalseAction(UIBoolJoin.PinDialogCancelPress, CancelPinDialog);
PinKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.TechPinDialogKeypad], true); PinKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.TechPinDialogKeypad], true);
PinKeypad.Digit0.UserObject = new Action<bool>(b => { if (b)DialPinDigit('0'); }); PinKeypad.Digit0.UserObject = new Action<bool>(b => { if (b)DialPinDigit('0'); });
PinKeypad.Digit1.UserObject = new Action<bool>(b => { if (b)DialPinDigit('1'); }); PinKeypad.Digit1.UserObject = new Action<bool>(b => { if (b)DialPinDigit('1'); });
PinKeypad.Digit2.UserObject = new Action<bool>(b => { if (b)DialPinDigit('2'); }); PinKeypad.Digit2.UserObject = new Action<bool>(b => { if (b)DialPinDigit('2'); });
PinKeypad.Digit3.UserObject = new Action<bool>(b => { if (b)DialPinDigit('3'); }); PinKeypad.Digit3.UserObject = new Action<bool>(b => { if (b)DialPinDigit('3'); });
PinKeypad.Digit4.UserObject = new Action<bool>(b => { if (b)DialPinDigit('4'); }); PinKeypad.Digit4.UserObject = new Action<bool>(b => { if (b)DialPinDigit('4'); });
PinKeypad.Digit5.UserObject = new Action<bool>(b => { if (b)DialPinDigit('5'); }); PinKeypad.Digit5.UserObject = new Action<bool>(b => { if (b)DialPinDigit('5'); });
PinKeypad.Digit6.UserObject = new Action<bool>(b => { if (b)DialPinDigit('6'); }); PinKeypad.Digit6.UserObject = new Action<bool>(b => { if (b)DialPinDigit('6'); });
PinKeypad.Digit7.UserObject = new Action<bool>(b => { if (b)DialPinDigit('7'); }); PinKeypad.Digit7.UserObject = new Action<bool>(b => { if (b)DialPinDigit('7'); });
PinKeypad.Digit8.UserObject = new Action<bool>(b => { if (b)DialPinDigit('8'); }); PinKeypad.Digit8.UserObject = new Action<bool>(b => { if (b)DialPinDigit('8'); });
PinKeypad.Digit9.UserObject = new Action<bool>(b => { if (b)DialPinDigit('9'); }); PinKeypad.Digit9.UserObject = new Action<bool>(b => { if (b)DialPinDigit('9'); });
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="d"></param> /// <param name="d"></param>
void DialPinDigit(char d) void DialPinDigit(char d)
{ {
PinEntryBuilder.Append(d); PinEntryBuilder.Append(d);
var len = PinEntryBuilder.Length; var len = PinEntryBuilder.Length;
SetPinDotsFeedback(len); SetPinDotsFeedback(len);
// check it! // check it!
if (len == 4) if (len == 4)
{ {
if (Config.Password == PinEntryBuilder.ToString()) if (Config.Password == PinEntryBuilder.ToString())
{ {
IsAuthorized = true; IsAuthorized = true;
SetPinDotsFeedback(0); SetPinDotsFeedback(0);
TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, false); TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, false);
Show(); Show();
} }
else else
{ {
SetPinDotsFeedback(0); SetPinDotsFeedback(0);
TriList.SetBool(UIBoolJoin.PinDialogErrorVisible, true); TriList.SetBool(UIBoolJoin.PinDialogErrorVisible, true);
new CTimer(o => new CTimer(o =>
{ {
TriList.SetBool(UIBoolJoin.PinDialogErrorVisible, false); TriList.SetBool(UIBoolJoin.PinDialogErrorVisible, false);
}, 1500); }, 1500);
} }
PinEntryBuilder.Remove(0, len); // clear it either way PinEntryBuilder.Remove(0, len); // clear it either way
} }
} }
/// <summary> /// <summary>
/// Draws the dots as pin is entered /// Draws the dots as pin is entered
/// </summary> /// </summary>
/// <param name="len"></param> /// <param name="len"></param>
void SetPinDotsFeedback(int len) void SetPinDotsFeedback(int len)
{ {
TriList.SetBool(UIBoolJoin.PinDialogDot1, len >= 1); TriList.SetBool(UIBoolJoin.PinDialogDot1, len >= 1);
TriList.SetBool(UIBoolJoin.PinDialogDot2, len >= 2); TriList.SetBool(UIBoolJoin.PinDialogDot2, len >= 2);
TriList.SetBool(UIBoolJoin.PinDialogDot3, len >= 3); TriList.SetBool(UIBoolJoin.PinDialogDot3, len >= 3);
TriList.SetBool(UIBoolJoin.PinDialogDot4, len == 4); TriList.SetBool(UIBoolJoin.PinDialogDot4, len == 4);
} }
/// <summary> /// <summary>
/// Does what it says /// Does what it says
/// </summary> /// </summary>
void CancelPinDialog() void CancelPinDialog()
{ {
PinEntryBuilder.Remove(0, PinEntryBuilder.Length); PinEntryBuilder.Remove(0, PinEntryBuilder.Length);
TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, false); TriList.SetBool(UIBoolJoin.PinDialog4DigitVisible, false);
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
void BuildStatusList() void BuildStatusList()
{ {
StatusList = new SubpageReferenceList(TriList, UISmartObjectJoin.TechStatusList, 3, 3, 3); StatusList = new SubpageReferenceList(TriList, UISmartObjectJoin.TechStatusList, 3, 3, 3);
StatusListDeviceIndexes = new Dictionary<ICommunicationMonitor, uint>(); StatusListDeviceIndexes = new Dictionary<ICommunicationMonitor, uint>();
uint i = 0; uint i = 0;
foreach (var d in DeviceManager.AllDevices) foreach (var d in DeviceManager.AllDevices)
{ {
// make sure it is both ICommunicationMonitor and a Device // make sure it is both ICommunicationMonitor and a Device
var sd = d as ICommunicationMonitor; var sd = d as ICommunicationMonitor;
if (sd == null) if (sd == null)
continue; continue;
var dd = sd as Device; var dd = sd as Device;
if(dd == null) if(dd == null)
continue; continue;
i++; i++;
StatusList.StringInputSig(i, 1).StringValue = dd.Name; StatusList.StringInputSig(i, 1).StringValue = dd.Name;
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)sd.CommunicationMonitor.Status; StatusList.UShortInputSig(i, 1).UShortValue = (ushort)sd.CommunicationMonitor.Status;
StatusListDeviceIndexes.Add(sd, i); StatusListDeviceIndexes.Add(sd, i);
sd.CommunicationMonitor.StatusChange += CommunicationMonitor_StatusChange ; sd.CommunicationMonitor.StatusChange += CommunicationMonitor_StatusChange ;
} }
StatusList.Count = (ushort)i; StatusList.Count = (ushort)i;
} }
/// <summary> /// <summary>
/// Builds the list of display controls /// Builds the list of display controls
/// </summary> /// </summary>
void BuildDisplayList() void BuildDisplayList()
{ {
DisplayList = new SubpageReferenceList(TriList, UISmartObjectJoin.TechDisplayControlsList, 10, 3, 3); DisplayList = new SubpageReferenceList(TriList, UISmartObjectJoin.TechDisplayControlsList, 10, 3, 3);
var devKeys = ConfigReader.ConfigObject.Devices.Where(d => var devKeys = ConfigReader.ConfigObject.Devices.Where(d =>
d.Group.Equals("display", StringComparison.OrdinalIgnoreCase) d.Group.Equals("display", StringComparison.OrdinalIgnoreCase)
|| d.Group.Equals("projector", StringComparison.OrdinalIgnoreCase)) || d.Group.Equals("projector", StringComparison.OrdinalIgnoreCase))
.Select(dd => dd.Key); .Select(dd => dd.Key);
var disps = DeviceManager.AllDevices.Where(d => var disps = DeviceManager.AllDevices.Where(d =>
devKeys.Contains(d.Key)); devKeys.Contains(d.Key));
ushort i = 0; ushort i = 0;
foreach (var disp in disps) foreach (var disp in disps)
{ {
var display = disp as DisplayBase; var display = disp as DisplayBase;
if (display != null) if (display != null)
{ {
i++; i++;
DisplayList.StringInputSig(i, 1).StringValue = display.Name; DisplayList.StringInputSig(i, 1).StringValue = display.Name;
DisplayList.GetBoolFeedbackSig(i, 1).SetSigFalseAction(display.PowerOn); DisplayList.GetBoolFeedbackSig(i, 1).SetSigFalseAction(display.PowerOn);
DisplayList.GetBoolFeedbackSig(i, 2).SetSigFalseAction(display.PowerOff); DisplayList.GetBoolFeedbackSig(i, 2).SetSigFalseAction(display.PowerOff);
if (display is TwoWayDisplayBase) if (display is TwoWayDisplayBase)
{ {
@@ -270,49 +270,49 @@ namespace PepperDash.Essentials.UIDrivers
var powerOffSig = DisplayList.BoolInputSig(1, 2); var powerOffSig = DisplayList.BoolInputSig(1, 2);
(display as TwoWayDisplayBase).PowerIsOnFeedback.LinkComplementInputSig(powerOffSig); (display as TwoWayDisplayBase).PowerIsOnFeedback.LinkComplementInputSig(powerOffSig);
} }
DisplayList.GetBoolFeedbackSig(i, 3).SetSigFalseAction(() => DisplayList.GetBoolFeedbackSig(i, 3).SetSigFalseAction(() =>
{ if (display is IInputHdmi1) (display as IInputHdmi1).InputHdmi1(); }); { if (display is IInputHdmi1) (display as IInputHdmi1).InputHdmi1(); });
DisplayList.GetBoolFeedbackSig(i, 4).SetSigFalseAction(() => DisplayList.GetBoolFeedbackSig(i, 4).SetSigFalseAction(() =>
{ if (display is IInputHdmi2) (display as IInputHdmi2).InputHdmi2(); }); { if (display is IInputHdmi2) (display as IInputHdmi2).InputHdmi2(); });
DisplayList.GetBoolFeedbackSig(i, 5).SetSigFalseAction(() => DisplayList.GetBoolFeedbackSig(i, 5).SetSigFalseAction(() =>
{ if (display is IInputHdmi3) (display as IInputHdmi3).InputHdmi3(); }); { if (display is IInputHdmi3) (display as IInputHdmi3).InputHdmi3(); });
//DisplayList.GetBoolFeedbackSig(i, 6).SetSigFalseAction(() => //DisplayList.GetBoolFeedbackSig(i, 6).SetSigFalseAction(() =>
//{ if (display is IInputHdmi4) (display as IInputHdmi4).InputHdmi4(); }); //{ if (display is IInputHdmi4) (display as IInputHdmi4).InputHdmi4(); });
DisplayList.GetBoolFeedbackSig(i, 6).SetSigFalseAction(() => DisplayList.GetBoolFeedbackSig(i, 6).SetSigFalseAction(() =>
{ if (display is IInputDisplayPort1) (display as IInputDisplayPort1).InputDisplayPort1(); }); { if (display is IInputDisplayPort1) (display as IInputDisplayPort1).InputDisplayPort1(); });
// Figure out some way to provide current input feedback // Figure out some way to provide current input feedback
if (display is TwoWayDisplayBase) if (display is TwoWayDisplayBase)
{ {
(display as TwoWayDisplayBase).CurrentInputFeedback.OutputChange += new EventHandler<EventArgs>(CurrentInputFeedback_OutputChange); (display as TwoWayDisplayBase).CurrentInputFeedback.OutputChange += new EventHandler<EventArgs>(CurrentInputFeedback_OutputChange);
} }
} }
} }
DisplayList.Count = i; DisplayList.Count = i;
} }
void CurrentInputFeedback_OutputChange(object sender, EventArgs e) void CurrentInputFeedback_OutputChange(object sender, EventArgs e)
{ {
throw new NotImplementedException();
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e) void CommunicationMonitor_StatusChange(object sender, MonitorStatusChangeEventArgs e)
{ {
var c = sender as ICommunicationMonitor; var c = sender as ICommunicationMonitor;
if (StatusListDeviceIndexes.ContainsKey(c)) if (StatusListDeviceIndexes.ContainsKey(c))
{ {
var i = StatusListDeviceIndexes[c]; var i = StatusListDeviceIndexes[c];
StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status; StatusList.UShortInputSig(i, 1).UShortValue = (ushort)e.Status;
} }
} }
} }
} }

View File

@@ -971,7 +971,7 @@ namespace PepperDash.Essentials
/// <param name="type"></param> /// <param name="type"></param>
void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) void CurrentRoom_CurrentSingleSourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{ {
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue) if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null)
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName; TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = _CurrentRoom.CurrentSourceInfo.PreferredName;
} }
@@ -994,10 +994,14 @@ namespace PepperDash.Essentials
string callListSharedSourceLabel; string callListSharedSourceLabel;
if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue) if (_CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _CurrentRoom.CurrentSourceInfo != null)
callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName; {
else Debug.Console(0, "*#* CurrentRoom.CurrentSourceInfo = {0}",
callListSharedSourceLabel = "None"; _CurrentRoom.CurrentSourceInfo != null ? _CurrentRoom.CurrentSourceInfo.SourceKey : "Nada!");
callListSharedSourceLabel = _CurrentRoom.CurrentSourceInfo.PreferredName;
}
else
callListSharedSourceLabel = "None";
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel; TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
} }