mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 09:15:06 +00:00
ecs-411: Most of keyboard driver
This commit is contained in:
@@ -26,8 +26,8 @@ namespace PepperDash.Essentials.Fusion
|
||||
public class EssentialsHuddleSpaceFusionSystemController : Device
|
||||
{
|
||||
public event EventHandler<ScheduleChangeEventArgs> ScheduleChange;
|
||||
public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
|
||||
public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
|
||||
//public event EventHandler<MeetingChangeEventArgs> MeetingEndWarning;
|
||||
//public event EventHandler<MeetingChangeEventArgs> NextMeetingBeginWarning;
|
||||
|
||||
FusionRoom FusionRoom;
|
||||
EssentialsHuddleSpaceRoom Room;
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
Debug.Console(0, this, "Adding huddle space driver");
|
||||
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
||||
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(Panel,
|
||||
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(Panel, avDriver,
|
||||
(room as EssentialsHuddleVtc1Room).VideoCodec);
|
||||
avDriver.SetVideoCodecDriver(codecDriver);
|
||||
avDriver.CurrentRoom = room as EssentialsHuddleVtc1Room;
|
||||
|
||||
@@ -22,8 +22,21 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint VolumeDownPress = 902;
|
||||
|
||||
//******************************************************
|
||||
//****************************************************
|
||||
// Codec General
|
||||
|
||||
/// <summary>
|
||||
/// 1001
|
||||
/// </summary>
|
||||
public const uint CallEndPress = 1001;
|
||||
/// <summary>
|
||||
/// 1002
|
||||
/// </summary>
|
||||
public const uint CallEndAllConfirmPress = 1002;
|
||||
|
||||
|
||||
// Audio Conference
|
||||
#warning Move these to 1100's
|
||||
/// <summary>
|
||||
/// 1001
|
||||
/// </summary>
|
||||
@@ -153,7 +166,21 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 2901
|
||||
/// </summary>
|
||||
public const uint KeyboardVisible = 2901;
|
||||
public const uint KeyboardVisible = 2901;
|
||||
/// <summary>
|
||||
/// 2902
|
||||
/// </summary>
|
||||
public const uint KeyboardClosePress = 2902;
|
||||
/// <summary>
|
||||
/// 2903
|
||||
/// </summary>
|
||||
public const uint KeyboardButton1Press = 2903;
|
||||
/// <summary>
|
||||
/// 2904
|
||||
/// </summary>
|
||||
public const uint KeyboardButton1Press = 2904;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 2910
|
||||
/// </summary>
|
||||
@@ -163,6 +190,9 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint KeyboardClearVisible = 2911;
|
||||
|
||||
// Letter joins start at 2921;
|
||||
|
||||
//******************************************************
|
||||
/// <summary>
|
||||
/// 3811
|
||||
/// </summary>
|
||||
@@ -476,32 +506,31 @@ namespace PepperDash.Essentials
|
||||
/// 15060
|
||||
/// </summary>
|
||||
public const uint Display2AudioButtonPressAndFb = 15060;
|
||||
|
||||
/// <summary>
|
||||
/// 15061 Reveals the dual-display subpage
|
||||
/// </summary>
|
||||
public const uint DualDisplayPageVisible = 15061;
|
||||
|
||||
/// <summary>
|
||||
/// 15062 Reveals the toggle switch for the sharing mode
|
||||
/// </summary>
|
||||
public const uint ToggleSharingModeVisible = 15062;
|
||||
|
||||
/// <summary>
|
||||
/// 15063 Press for the toggle mode switch
|
||||
/// </summary>
|
||||
public const uint ToggleSharingModePress = 15063;
|
||||
|
||||
/// <summary>
|
||||
/// 15064
|
||||
/// </summary>
|
||||
public const uint LogoDefaultVisible = 15064;
|
||||
|
||||
/// <summary>
|
||||
/// 15065
|
||||
/// </summary>
|
||||
public const uint LogoUrlVisible = 15065;
|
||||
/// <summary>
|
||||
/// 15066 - Reveals the active calls header item
|
||||
/// </summary>
|
||||
public const uint HeaderActiveCallsListVisible = 15066;
|
||||
/// <summary>
|
||||
/// 15083 - Press for Call help desk on AC/VC
|
||||
/// </summary>
|
||||
public const uint HelpPageShowCallButtonPress = 15083;
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
public class UISmartObjectJoin
|
||||
{
|
||||
//******************************************************
|
||||
// Conference
|
||||
/// <summary>
|
||||
/// 1001 - The list that reveals in header to show calls
|
||||
/// </summary>
|
||||
public const uint CodecActiveCallsHeaderList = 1001;
|
||||
|
||||
// Video Conference
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase
|
||||
public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase, IHasPopupInterlock
|
||||
{
|
||||
CrestronTouchpanelPropertiesConfig Config;
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Represents
|
||||
/// </summary>
|
||||
JoinedSigInterlock PopupInterlock;
|
||||
public JoinedSigInterlock PopupInterlock { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Interlock for various source, camera, call control bars. The bar above the activity footer. This is also
|
||||
@@ -155,12 +155,6 @@ namespace PepperDash.Essentials
|
||||
//PowerOffTimeout = 30000;
|
||||
|
||||
//TriList.StringInput[UIStringJoin.StartActivityText].StringValue = "Tap an activity below";
|
||||
|
||||
// Reveal proper header buttons with/without lighting
|
||||
if(false) // has lighting
|
||||
TriList.SetBool(UIBoolJoin.CallLeftHeaderButtonVisible, true);
|
||||
else
|
||||
TriList.SetBool(UIBoolJoin.CallRightHeaderButtonVisible, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -272,9 +266,14 @@ namespace PepperDash.Essentials
|
||||
if(roomConf.OneButtonMeeting != null && roomConf.OneButtonMeeting.Enable)
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.CalendarHeaderButtonVisible, true);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CallHeaderButtonPress, () =>
|
||||
{ });
|
||||
}
|
||||
TriList.SetBool(UIBoolJoin.CallLeftHeaderButtonVisible, true);
|
||||
}
|
||||
else
|
||||
TriList.SetBool(UIBoolJoin.CallRightHeaderButtonVisible, true);
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CallHeaderButtonPress, () =>
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
|
||||
|
||||
|
||||
// Setup button - shows volumes with default button OR hold for tech page
|
||||
TriList.SetSigHeldAction(UIBoolJoin.GearHeaderButtonPress, 2000,
|
||||
@@ -978,4 +977,9 @@ namespace PepperDash.Essentials
|
||||
RefreshSourceInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IHasPopupInterlock
|
||||
{
|
||||
JoinedSigInterlock PopupInterlock { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
|
||||
|
||||
#warning When InCall, keypad text should clear. Keypad becomes DTMF only. Delete is gone and disabled. Send keypresses immediately to SendDTMF. Queue them in disaply string.
|
||||
#warning when Call ends, clear keypad text.
|
||||
#warning FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button
|
||||
/// <summary>
|
||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||
@@ -26,6 +24,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
public class EssentialsVideoCodecUiDriver : PanelDriverBase
|
||||
{
|
||||
IHasPopupInterlock Parent;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -60,6 +60,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
SmartObjectNumeric DialKeypad;
|
||||
|
||||
SubpageReferenceList ActiveCallsSRL;
|
||||
|
||||
// These are likely temp until we get a keyboard built
|
||||
StringFeedback DialStringFeedback;
|
||||
StringBuilder DialStringBuilder = new StringBuilder();
|
||||
@@ -67,17 +69,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
ModalDialog IncomingCallModal;
|
||||
|
||||
eKeypadMode KeypadMode;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="triList"></param>
|
||||
/// <param name="codec"></param>
|
||||
public EssentialsVideoCodecUiDriver(BasicTriListWithSmartObject triList, VideoCodecBase codec)
|
||||
public EssentialsVideoCodecUiDriver(BasicTriListWithSmartObject triList, IHasPopupInterlock parent, VideoCodecBase codec)
|
||||
: base(triList)
|
||||
{
|
||||
Codec = codec;
|
||||
SetupCallStagingPopover();
|
||||
SetupDialKeypad();
|
||||
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
|
||||
|
||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||
|
||||
@@ -118,6 +123,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
case eCodecCallStatus.Connected:
|
||||
// fire at SRL item
|
||||
Debug.Console(1, "*#* UI: Call Connected {0}", call.Name);
|
||||
KeypadMode = eKeypadMode.DTMF;
|
||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||
DialStringFeedback.FireUpdate();
|
||||
TriList.SetBool(UIBoolJoin.KeyboardClearVisible, false);
|
||||
break;
|
||||
case eCodecCallStatus.Connecting:
|
||||
// fire at SRL item
|
||||
@@ -128,6 +137,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
break;
|
||||
case eCodecCallStatus.Disconnected:
|
||||
Debug.Console(1, "*#* UI: Call Disconnecting {0}", call.Name);
|
||||
if (!Codec.IsInCall)
|
||||
{
|
||||
KeypadMode = eKeypadMode.Dial;
|
||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||
DialStringFeedback.FireUpdate();
|
||||
}
|
||||
break;
|
||||
case eCodecCallStatus.Disconnecting:
|
||||
break;
|
||||
@@ -153,6 +168,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
||||
StagingBarInterlock.ShowInterlocked(Codec.IsInCall ?
|
||||
UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||
|
||||
// Set mode of header button
|
||||
if (!Codec.IsInCall)
|
||||
TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 0);
|
||||
@@ -162,9 +178,29 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||
|
||||
// Update list of calls
|
||||
var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList();
|
||||
Debug.Console(1, "*#* UI - Codec has {0} calls", activeList.Count);
|
||||
UpdateCallsHeaderList(call);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redraws the calls list on the header
|
||||
/// </summary>
|
||||
void UpdateCallsHeaderList(CodecActiveCallItem call)
|
||||
{
|
||||
var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList();
|
||||
ActiveCallsSRL.Clear();
|
||||
ushort i = 1;
|
||||
foreach (var c in activeList)
|
||||
{
|
||||
var item = new SubpageReferenceListItem(1, ActiveCallsSRL);
|
||||
ActiveCallsSRL.StringInputSig(i, 1).StringValue = c.Name;
|
||||
ActiveCallsSRL.StringInputSig(i, 2).StringValue = c.Number;
|
||||
ActiveCallsSRL.StringInputSig(i, 3).StringValue = c.Status.ToString();
|
||||
ActiveCallsSRL.UShortInputSig(i, 1).UShortValue = (ushort)(c.Type == eCodecCallType.Video ? 2 : 1);
|
||||
var cc = c; // for scope in lambda
|
||||
ActiveCallsSRL.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => Codec.EndCall(cc));
|
||||
i++;
|
||||
}
|
||||
ActiveCallsSRL.Count = (ushort)activeList.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -222,9 +258,17 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
void SetupCallStagingPopover()
|
||||
{
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
|
||||
{
|
||||
if (Codec.ActiveCalls.Count > 1)
|
||||
Parent.PopupInterlock.ShowInterlocked(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||
else
|
||||
Codec.EndAllCalls();
|
||||
});
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, Codec.EndAllCalls);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -290,10 +334,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
void ConnectPress()
|
||||
{
|
||||
if (Codec.IsInCall)
|
||||
Codec.EndAllCalls();
|
||||
else
|
||||
Codec.Dial(DialStringBuilder.ToString());
|
||||
Codec.Dial(DialStringBuilder.ToString());
|
||||
}
|
||||
|
||||
|
||||
@@ -303,10 +344,20 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// <param name="i"></param>
|
||||
void DialKeypadPress(string i)
|
||||
{
|
||||
DialStringBuilder.Append(i);
|
||||
DialStringFeedback.FireUpdate();
|
||||
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
||||
DialStringBuilder.Length > 0;
|
||||
if (KeypadMode == eKeypadMode.Dial)
|
||||
{
|
||||
DialStringBuilder.Append(i);
|
||||
DialStringFeedback.FireUpdate();
|
||||
TriList.BooleanInput[UIBoolJoin.KeyboardClearVisible].BoolValue =
|
||||
DialStringBuilder.Length > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Codec.SendDtmf(i);
|
||||
DialStringBuilder.Append(i);
|
||||
DialStringFeedback.FireUpdate();
|
||||
// no delete key in this mode!
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -320,5 +371,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
DialStringBuilder.Length > 0;
|
||||
TriList.SetBool(UIBoolJoin.VCStagingConnectEnable, DialStringBuilder.Length > 0);
|
||||
}
|
||||
|
||||
enum eKeypadMode
|
||||
{
|
||||
Dial, DTMF
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user