mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19:54:59 +00:00
Adding warming and cooling modal. Warming seems to occasionally not happen
This commit is contained in:
@@ -29,8 +29,8 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public override void InitializeSystem()
|
||||
{
|
||||
CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
|
||||
// ConsoleAccessLevelEnum.AccessOperator);
|
||||
//CrestronConsole.AddNewConsoleCommand(s => TearDown(), "ungo", "Reloads configuration file",
|
||||
// ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(s =>
|
||||
@@ -40,7 +40,7 @@ namespace PepperDash.Essentials
|
||||
},
|
||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
//GoWithLoad();
|
||||
GoWithLoad();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1050,6 +1050,10 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
void SetUpOccupancy()
|
||||
{
|
||||
|
||||
return;
|
||||
|
||||
|
||||
#warning Add actual object logic check here
|
||||
//if (Room.OccupancyObj != null)
|
||||
//{
|
||||
|
||||
Binary file not shown.
@@ -30,6 +30,45 @@ namespace PepperDash.Essentials
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected override Func<bool> IsWarmingFeedbackFunc
|
||||
{
|
||||
get
|
||||
{
|
||||
return () =>
|
||||
{
|
||||
var disp = DefaultDisplay as DisplayBase;
|
||||
if (disp != null)
|
||||
return disp.IsWarmingUpFeedback.BoolValue;
|
||||
else
|
||||
return false;
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected override Func<bool> IsCoolingFeedbackFunc
|
||||
{
|
||||
get
|
||||
{
|
||||
return () =>
|
||||
{
|
||||
var disp = DefaultDisplay as DisplayBase;
|
||||
if (disp != null)
|
||||
{
|
||||
Debug.Console(2, this, "IS COOLING FUNC-- Display cooling={0}", disp.IsCoolingDownFeedback.BoolValue);
|
||||
return disp.IsCoolingDownFeedback.BoolValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public EssentialsRoomPropertiesConfig Config { get; private set; }
|
||||
|
||||
@@ -129,6 +168,7 @@ namespace PepperDash.Essentials
|
||||
var disp = DefaultDisplay as DisplayBase;
|
||||
if (disp != null)
|
||||
{
|
||||
// Link power, warming, cooling to display
|
||||
disp.PowerIsOnFeedback.OutputChange += (o, a) =>
|
||||
{
|
||||
if (disp.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
||||
@@ -138,11 +178,15 @@ namespace PepperDash.Essentials
|
||||
OnFeedback.FireUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
disp.IsWarmingUpFeedback.OutputChange += (o, a) => { IsWarmingUpFeedback.FireUpdate(); };
|
||||
disp.IsCoolingDownFeedback.OutputChange += (o, a) => { IsCoolingDownFeedback.FireUpdate(); };
|
||||
}
|
||||
|
||||
SourceListKey = "default";
|
||||
EnablePowerOnToLastSource = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -22,7 +22,10 @@ namespace PepperDash.Essentials
|
||||
|| (Display1SourceInfo != null
|
||||
&& Display1SourceInfo.Type != eSourceListItemType.Off)
|
||||
|| (Display2SourceInfo != null
|
||||
&& Display2SourceInfo.Type != eSourceListItemType.Off); } }
|
||||
&& Display2SourceInfo.Type != eSourceListItemType.Off); } }
|
||||
|
||||
protected override Func<bool> IsWarmingFeedbackFunc { get { return () =>false;; } }
|
||||
protected override Func<bool> IsCoolingFeedbackFunc { get { return () => false; } }
|
||||
|
||||
public EssentialsPresentationRoomPropertiesConfig Config { get; private set; }
|
||||
|
||||
|
||||
@@ -27,8 +27,11 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public BoolFeedback OnFeedback { get; private set; }
|
||||
|
||||
public BoolFeedback IsWarmingFeedback { get; private set; }
|
||||
public BoolFeedback IsCoolingFeedback { get; private set; }
|
||||
public BoolFeedback IsWarmingUpFeedback { get; private set; }
|
||||
public BoolFeedback IsCoolingDownFeedback { get; private set; }
|
||||
|
||||
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
|
||||
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Timer used for informing the UIs of a shutdown
|
||||
@@ -67,8 +70,10 @@ namespace PepperDash.Essentials
|
||||
ShutdownType = ShutdownType.None;
|
||||
|
||||
OnFeedback = new BoolFeedback(OnFeedbackFunc);
|
||||
}
|
||||
|
||||
IsWarmingUpFeedback = new BoolFeedback(IsWarmingFeedbackFunc);
|
||||
IsCoolingDownFeedback = new BoolFeedback(IsCoolingFeedbackFunc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -140,6 +140,8 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
CTimer PowerOffTimer;
|
||||
|
||||
ModalDialog WarmingCoolingModal;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
@@ -203,13 +205,17 @@ namespace PepperDash.Essentials
|
||||
ShowInterlockedModal(UIBoolJoin.HelpPageVisible);
|
||||
});
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
||||
// ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||
|
||||
#warning Add press and hold to gear button here
|
||||
TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false;
|
||||
#warning Hide Gear on ipad for now
|
||||
TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true;
|
||||
TriList.SetSigFalseAction(UIBoolJoin.GearHeaderButtonPress, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
||||
ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
||||
//ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
||||
TriList.SetSigFalseAction(UIBoolJoin.TechPagesExitButton, () =>
|
||||
HideCurrentInterlockedModal());
|
||||
|
||||
// power-related functions
|
||||
// Note: some of these are not directly-related to the huddle space UI, but are held over
|
||||
@@ -499,7 +505,7 @@ namespace PepperDash.Essentials
|
||||
};
|
||||
onFb.OutputChange += offHandler;
|
||||
|
||||
modal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true,
|
||||
modal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true,
|
||||
but =>
|
||||
{
|
||||
if (but != 2) // any button except for End cancels
|
||||
@@ -616,10 +622,10 @@ namespace PepperDash.Essentials
|
||||
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
|
||||
{
|
||||
if (_CurrentRoom == room) return;
|
||||
// Disconnect current (probably never called)
|
||||
if (_CurrentRoom != null)
|
||||
{
|
||||
// Disconnect current room
|
||||
_CurrentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange;
|
||||
_CurrentRoom.CurrentVolumeDeviceChange -= this.CurrentRoom_CurrentAudioDeviceChange;
|
||||
ClearAudioDeviceConnections();
|
||||
_CurrentRoom.CurrentSingleSourceChange -= this.CurrentRoom_SourceInfoChange;
|
||||
@@ -627,7 +633,11 @@ namespace PepperDash.Essentials
|
||||
_CurrentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted;
|
||||
_CurrentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished;
|
||||
_CurrentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled;
|
||||
}
|
||||
|
||||
_CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
|
||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||
_CurrentRoom.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
|
||||
}
|
||||
_CurrentRoom = room;
|
||||
|
||||
if (_CurrentRoom != null)
|
||||
@@ -670,6 +680,9 @@ namespace PepperDash.Essentials
|
||||
|
||||
// Link up all the change events from the room
|
||||
_CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
|
||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||
_CurrentRoom.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
|
||||
|
||||
_CurrentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange;
|
||||
RefreshAudioDeviceConnections();
|
||||
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
||||
@@ -688,6 +701,7 @@ namespace PepperDash.Essentials
|
||||
void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
var value = _CurrentRoom.OnFeedback.BoolValue;
|
||||
Debug.Console(2, CurrentRoom, "UI: Is on event={0}", value);
|
||||
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
||||
if (value) //ON
|
||||
{
|
||||
@@ -704,6 +718,46 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void CurrentRoom_IsWarmingFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
var value = CurrentRoom.IsWarmingUpFeedback.BoolValue;
|
||||
Debug.Console(2, CurrentRoom, "UI: WARMING event={0}", value);
|
||||
|
||||
if (value)
|
||||
{
|
||||
WarmingCoolingModal = new ModalDialog(TriList);
|
||||
WarmingCoolingModal.PresentModalDialog(0, "Powering up", "Power", "Room is warming up. Please wait.",
|
||||
"", "", false, false, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WarmingCoolingModal != null)
|
||||
WarmingCoolingModal.CancelDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IsCoolingDownFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
var value = CurrentRoom.IsCoolingDownFeedback.BoolValue;
|
||||
Debug.Console(2, CurrentRoom, "UI: Cooldown event={0}", value);
|
||||
|
||||
if (value)
|
||||
{
|
||||
WarmingCoolingModal = new ModalDialog(TriList);
|
||||
WarmingCoolingModal.PresentModalDialog(0, "Shutting down", "Power", "Room is shutting down. Please wait.",
|
||||
"", "", false, false, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WarmingCoolingModal != null)
|
||||
WarmingCoolingModal.CancelDialog();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hides source for provided source info
|
||||
/// </summary>
|
||||
|
||||
@@ -655,7 +655,7 @@ namespace PepperDash.Essentials
|
||||
uint seconds = time / 1000;
|
||||
var message = string.Format("Meeting will end in {0} seconds", seconds);
|
||||
modal.PresentModalDialog(2, "End Meeting", "Power", message,
|
||||
"End Meeting Now", "Cancel", true,
|
||||
"End Meeting Now", "Cancel", true, true,
|
||||
but =>
|
||||
{
|
||||
EndMeetingButtonSig.BoolValue = false;
|
||||
|
||||
@@ -113,6 +113,14 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint VolumesPageVisible = 3870;
|
||||
/// <summary>
|
||||
/// 3901
|
||||
/// </summary>
|
||||
public const uint TechPagesExitButton = 3901;
|
||||
/// <summary>
|
||||
/// 3902
|
||||
/// </summary>
|
||||
public const uint TechPanelSetupVisible = 3902;
|
||||
/// <summary>
|
||||
/// 3999
|
||||
/// </summary>
|
||||
public const uint GenericModalVisible = 3999;
|
||||
|
||||
Reference in New Issue
Block a user