diff --git a/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs b/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs
index bc9ff012..2e529306 100644
--- a/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Touchpanels/TriListExtensions.cs
@@ -73,6 +73,40 @@ namespace PepperDash.Essentials.Core
return SetSigHeldAction(tl, sigNum, heldMs, heldAction, null);
}
+ ///
+ /// Sets an action to a held sig as well as a released-without-hold action
+ ///
+ ///
+ public static BoolOutputSig SetSigHeldAction(this BoolOutputSig sig, uint heldMs, Action heldAction, Action releaseAction)
+ {
+ CTimer heldTimer = null;
+ bool wasHeld = false;
+ return sig.SetBoolSigAction(press =>
+ {
+ if (press)
+ {
+ wasHeld = false;
+ // Could insert a pressed action here
+ heldTimer = new CTimer(o =>
+ {
+ // if still held and there's an action
+ if (sig.BoolValue && heldAction != null)
+ {
+ wasHeld = true;
+ // Hold action here
+ heldAction();
+ }
+ }, heldMs);
+ }
+ else if (!wasHeld) // released
+ {
+ heldTimer.Stop();
+ if (releaseAction != null)
+ releaseAction();
+ }
+ });
+
+ }
///
/// Sets an action to a held sig as well as a released-without-hold action
@@ -80,35 +114,9 @@ namespace PepperDash.Essentials.Core
/// The sig
public static BoolOutputSig SetSigHeldAction(this BasicTriList tl, uint sigNum, uint heldMs, Action heldAction, Action releaseAction)
{
- CTimer heldTimer = null;
- bool wasHeld = false;
- return tl.SetBoolSigAction(sigNum, press =>
- {
- if (press)
- {
- wasHeld = false;
- // Could insert a pressed action here
- heldTimer = new CTimer(o =>
- {
- // if still held and there's an action
- if (tl.BooleanOutput[sigNum].BoolValue && heldAction != null)
- {
- wasHeld = true;
- // Hold action here
- heldAction();
- }
- }, heldMs);
- }
- else if(!wasHeld) // released
- {
- heldTimer.Stop();
- if (releaseAction != null)
- releaseAction();
- }
- });
+ return tl.BooleanOutput[sigNum].SetSigHeldAction(heldMs, heldAction, releaseAction);
}
-
///
///
///
diff --git a/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs b/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs
index 7edbec1c..a641328c 100644
--- a/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs
+++ b/Essentials Devices Common/Essentials Devices Common/Codec/iHasScheduleAwareness.cs
@@ -44,15 +44,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
{
get
{
- var timeToMeetingStart = StartTime - DateTime.Now;
-
- var timetoMeetingEnd = DateTime.Now - EndTime;
-
- // Meeting is joinable from 5 minutes before start until 5 minutes before end
- if (timeToMeetingStart.Minutes <= 5 && timetoMeetingEnd.Minutes >= 5)
- return true;
- else
- return false;
+ return StartTime.AddMinutes(-5) <= DateTime.Now
+ && DateTime.Now <= EndTime.AddMinutes(-5);
}
}
public string ConferenceNumberToDial { get; set; }
diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
index 82256f40..1b1e758d 100644
--- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
+++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs
@@ -333,8 +333,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
for(int i = 0; i < 5; i++)
{
var m = new Meeting();
- m.StartTime = DateTime.Now.AddHours(1 + i);
- m.EndTime = DateTime.Now.AddHours(1 + i).AddMinutes(30);
+ m.StartTime = DateTime.Now.AddMinutes(3).AddHours(i);
+ m.EndTime = DateTime.Now.AddHours(i).AddMinutes(30);
m.Title = "Meeting " + i;
m.ConferenceNumberToDial = i + "meeting@fake.com";
sch.Meetings.Add(m);
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
index fef87f57..ac728c13 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
@@ -517,6 +517,10 @@ namespace PepperDash.Essentials
/// 15045 - Visibility for the bar containing call navigation button list
///
public const uint CallStagingBarVisible = 15045;
+ ///
+ /// 15046
+ ///
+ public const uint MeetingsListVisible = 15046;
///
/// 15051
///
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
index e7c02ab1..06b3bdf3 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
@@ -61,5 +61,9 @@
/// 15022 The main activity footer
///
public const uint ActivityFooterSRL = 15022;
+ ///
+ /// 15023 - The header meetings SRL
+ ///
+ public const uint MeetingListSRL = 15023;
}
}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs b/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs
index ebeb5593..6533d420 100644
--- a/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs
+++ b/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs
@@ -25,7 +25,7 @@ namespace PepperDash.Essentials
{
public BoolInputSig SelectedSig { get; private set; }
public BoolInputSig VisibleSig { get; private set; }
- BoolOutputSig OutputSig;
+ public BoolOutputSig OutputSig { get; private set; }
StringInputSig IconSig;
public HeaderListButton(SmartObjectHeaderButtonList list, uint index)
@@ -37,11 +37,6 @@ namespace PepperDash.Essentials
IconSig = so.StringInput["Set Item " + index + " Icon Serial"];
}
- public void SetBoolFalseAction(Action a)
- {
- OutputSig.SetSigFalseAction(a);
- }
-
public void SetIcon(string i)
{
IconSig.StringValue = i;
diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs
index 2d5fa7ad..2dbf89a7 100644
--- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs
+++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs
@@ -10,6 +10,7 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.PageManagers;
using PepperDash.Essentials.Room.Config;
+using PepperDash.Essentials.Devices.Common.VideoCodec;
namespace PepperDash.Essentials
{
@@ -85,6 +86,11 @@ namespace PepperDash.Essentials
///
SubpageReferenceList ActivityFooterSrl;
+ ///
+ ///
+ ///
+ SubpageReferenceList MeetingsSrl;
+
///
/// The list of buttons on the header. Managed with visibility only
///
@@ -188,6 +194,9 @@ namespace PepperDash.Essentials
ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1);
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
+ MeetingsSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
+
+
// buttons are added in SetCurrentRoom
HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
@@ -408,6 +417,15 @@ namespace PepperDash.Essentials
}
}
+ ///
+ /// Calendar should only be visible when it's supposed to
+ ///
+ void CalendarPress()
+ {
+ RefreshMeetingsList();
+ PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsListVisible);
+ }
+
///
/// Reveals the tech page and puts away anything that's in the way.
///
@@ -803,12 +821,9 @@ namespace PepperDash.Essentials
//
var setupButton = new HeaderListButton(HeaderButtonsList, 5);
setupButton.SetIcon(HeaderListButton.Gear);
- setupButton.SetBoolFalseAction(() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
-#warning Add held action - and add press/hold to SIG helper
- //// Setup button - shows volumes with default button OR hold for tech page
- //TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
- // ShowTech,
- // () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
+ setupButton.OutputSig.SetSigHeldAction(2000,
+ ShowTech,
+ () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
PopupInterlock.HideAndClear());
@@ -833,7 +848,7 @@ namespace PepperDash.Essentials
}
var helpButton = new HeaderListButton(HeaderButtonsList, 4);
helpButton.SetIcon(HeaderListButton.Help);
- helpButton.SetBoolFalseAction(() =>
+ helpButton.OutputSig.SetSigFalseAction(() =>
{
string message = null;
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
@@ -859,14 +874,14 @@ namespace PepperDash.Essentials
{
var calBut = new HeaderListButton(HeaderButtonsList, nextIndex);
calBut.SetIcon(HeaderListButton.Calendar);
- calBut.SetBoolFalseAction(() => { });
+ calBut.OutputSig.SetSigFalseAction(CalendarPress);
nextIndex--;
}
// Call button
var callBut = new HeaderListButton(HeaderButtonsList, nextIndex);
callBut.SetIcon(HeaderListButton.OnHook);
- callBut.SetBoolFalseAction(() =>
+ callBut.OutputSig.SetSigFalseAction(() =>
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
nextIndex--;
@@ -875,10 +890,36 @@ namespace PepperDash.Essentials
{
var blankBut = new HeaderListButton(HeaderButtonsList, i);
blankBut.ClearIcon();
- blankBut.SetBoolFalseAction(() => { });
+ blankBut.OutputSig.SetSigFalseAction(() => { });
}
}
+ ///
+ ///
+ ///
+ void RefreshMeetingsList()
+ {
+ ushort i = 0;
+ foreach (var m in CurrentRoom.ScheduleSource.CodecSchedule.Meetings)
+ {
+ i++;
+ MeetingsSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToShortTimeString();
+ MeetingsSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToShortTimeString();
+ MeetingsSrl.StringInputSig(i, 3).StringValue = m.Title;
+ MeetingsSrl.StringInputSig(i, 4).StringValue = "Join";
+ MeetingsSrl.BoolInputSig(i, 2).BoolValue = m.Joinable;
+ var mm = m; // lambda scope
+ MeetingsSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
+ {
+ PopupInterlock.Hide();
+ var d = CurrentRoom.ScheduleSource as VideoCodecBase;
+ if (d != null)
+ d.Dial(mm.ConferenceNumberToDial);
+ });
+ }
+ MeetingsSrl.Count = i;
+ }
+
///
/// For room on/off changes
///
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index 240f00a7..b28fd66a 100644
Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ
diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll
index 57b45d18..938b9a09 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ