diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo index ca8de72b..5c298888 100644 Binary files a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo and b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo differ diff --git a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo index 2fd062fe..9ada73a6 100644 Binary files a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo and b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo differ diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo index 3c2613d0..cf96a018 100644 Binary files a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo and b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo differ diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo index d044573c..28220ecb 100644 Binary files a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo and b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo differ diff --git a/Essentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs b/Essentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs index c28d2370..42cf16e4 100644 --- a/Essentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs +++ b/Essentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs @@ -78,6 +78,8 @@ namespace PepperDash.Essentials /// public string SourceListKey { get; set; } + public string DefaultSourceItem { get; set; } + /// /// If room is off, enables power on to last source. Default true /// @@ -191,6 +193,15 @@ namespace PepperDash.Essentials RunRouteAction("roomOff"); } + /// + /// Routes the default source item, if any + /// + public void RunDefaultRoute() + { + if (DefaultSourceItem != null) + RunRouteAction(DefaultSourceItem); + } + /// /// /// diff --git a/Essentials/PepperDashEssentials/Room/EssentialsRoomConfig.cs b/Essentials/PepperDashEssentials/Room/EssentialsRoomConfig.cs index dc1ebc87..c970f382 100644 --- a/Essentials/PepperDashEssentials/Room/EssentialsRoomConfig.cs +++ b/Essentials/PepperDashEssentials/Room/EssentialsRoomConfig.cs @@ -30,6 +30,7 @@ namespace PepperDash.Essentials var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching; var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props); huddle.SourceListKey = props.SourceListKey; + huddle.DefaultSourceItem = props.DefaultSourceItem; return huddle; } else if (typeName == "presentation") @@ -85,6 +86,7 @@ namespace PepperDash.Essentials public string DefaultDisplayKey { get; set; } public string DefaultAudioKey { get; set; } public string SourceListKey { get; set; } + public string DefaultSourceItem { get; set; } } /// diff --git a/Essentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs index e55be61a..897db6b7 100644 --- a/Essentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs @@ -349,6 +349,9 @@ namespace PepperDash.Essentials TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true; TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true; + // Run default source when room is off and share is pressed + if (!CurrentRoom.OnFeedback.BoolValue) + CurrentRoom.RunDefaultRoute(); } void ShowInterlockedModal(uint join) @@ -486,13 +489,17 @@ namespace PepperDash.Essentials PowerDownModal = new ModalDialog(TriList); var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds); - // figure out a cleaner way to update gauge - var gauge = CurrentRoom.ShutdownPromptTimer.PercentFeedback; - EventHandler gaugeHandler = null; - gaugeHandler = (o, a) => TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = - (ushort)(gauge.UShortValue * 65535 / 100); - gauge.OutputChange += gaugeHandler; + //// figure out a cleaner way to update gauge + //var gauge = CurrentRoom.ShutdownPromptTimer.PercentFeedback; + //EventHandler gaugeHandler = null; + //gaugeHandler = (o, a) => TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = + // (ushort)(gauge.UShortValue * 65535 / 100); + //gauge.OutputChange += gaugeHandler; + // Attach timer things to modal + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange += ShutdownPromptTimer_PercentFeedback_OutputChange; + // respond to offs by cancelling dialog var onFb = CurrentRoom.OnFeedback; EventHandler offHandler = null; @@ -503,7 +510,7 @@ namespace PepperDash.Essentials EndMeetingButtonSig.BoolValue = false; PowerDownModal.HideDialog(); onFb.OutputChange -= offHandler; - gauge.OutputChange -= gaugeHandler; + //gauge.OutputChange -= gaugeHandler; } }; onFb.OutputChange += offHandler; @@ -528,6 +535,9 @@ namespace PepperDash.Essentials { Debug.Console(2, "*#*UI shutdown prompt finished"); EndMeetingButtonSig.BoolValue = false; + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; + } /// @@ -541,6 +551,22 @@ namespace PepperDash.Essentials if (PowerDownModal != null) PowerDownModal.HideDialog(); EndMeetingButtonSig.BoolValue = false; + + CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; + CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; + } + + void ShutdownPromptTimer_TimeRemainingFeedback_OutputChange(object sender, EventArgs e) + { + + var message = string.Format("Meeting will end in {0} seconds", (sender as StringFeedback).StringValue); + TriList.StringInput[ModalDialog.MessageTextJoin].StringValue = message; + } + + void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e) + { + var value = (ushort)((sender as IntFeedback).UShortValue * 65535 / 100); + TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value; } /// diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 82f09a0d..8b05bec8 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 0738384d..614e7dad 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ diff --git a/devjson commands.json b/devjson commands.json index c5e6e194..c1e69fc2 100644 --- a/devjson commands.json +++ b/devjson commands.json @@ -6,4 +6,6 @@ devjson:1 {"deviceKey":"timer","methodName":"Start" } devjson:1 {"deviceKey":"timer","methodName":"Cancel" } -devjson:1 {"deviceKey":"timer","methodName":"Reset" } \ No newline at end of file +devjson:1 {"deviceKey":"timer","methodName":"Reset" } + +devjson:1 {"deviceKey":"room1","methodName":"Shutdown" } \ No newline at end of file