mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-27 03:14:57 +00:00
Warming, cooling synced with display.
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
@@ -97,7 +98,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
TriList = triList;
|
||||
// Attach actions to buttons
|
||||
triList.SetSigFalseAction(Button1Join, () => OnModalComplete(1));
|
||||
triList.SetSigFalseAction(Button1Join, () => OnModalComplete(1));
|
||||
triList.SetSigFalseAction(Button2Join, () => OnModalComplete(2));
|
||||
triList.SetSigFalseAction(CancelButtonJoin, () => { if (CanCancel) CancelDialog(); });
|
||||
CanCancel = true;
|
||||
|
||||
Binary file not shown.
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.CrestronThread;
|
||||
using Crestron.SimplSharpPro;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
@@ -233,11 +234,16 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
Debug.Console(2, this, "NEW POWER STATE={0}, CURRENT={1}", newVal, _PowerIsOn);
|
||||
if (newVal != _PowerIsOn)
|
||||
{
|
||||
_PowerIsOn = newVal;
|
||||
CrestronEnvironment.Sleep(1500);
|
||||
Debug.Console(2, this, "NEW POWER STATE AFTER PAUSE={0} CURRENT={1}", newVal, _PowerIsOn);
|
||||
if (newVal != _PowerIsOn)
|
||||
PowerIsOnFeedback.FireUpdate();
|
||||
CrestronInvoke.BeginInvoke(o =>
|
||||
{
|
||||
CrestronEnvironment.Sleep(1500);
|
||||
Debug.Console(2, this, "NEW POWER STATE AFTER PAUSE={0} CURRENT={1}", newVal, _PowerIsOn);
|
||||
if (newVal != _PowerIsOn)
|
||||
{
|
||||
_PowerIsOn = newVal;
|
||||
PowerIsOnFeedback.FireUpdate();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -22,10 +22,10 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
var disp = DefaultDisplay as DisplayBase;
|
||||
var val = CurrentSourceInfo != null
|
||||
&& CurrentSourceInfo.Type == eSourceListItemType.Route
|
||||
&& disp != null
|
||||
&& disp.PowerIsOnFeedback.BoolValue;
|
||||
Debug.Console(2, this, "************** ROOM POWER {0}", val);
|
||||
&& CurrentSourceInfo.Type == eSourceListItemType.Route
|
||||
&& disp != null
|
||||
&& disp.PowerIsOnFeedback.BoolValue;
|
||||
Debug.Console(2, this, "Display power={0}, has CurrentSource={1}", disp.PowerIsOnFeedback, CurrentSourceInfo != null);
|
||||
return val;
|
||||
};
|
||||
}
|
||||
@@ -58,14 +58,9 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace PepperDash.Essentials
|
||||
set
|
||||
{
|
||||
_DefaultRoomKey = value;
|
||||
CurrentRoom = DeviceManager.GetDeviceForKey(value) as EssentialsHuddleSpaceRoom;
|
||||
//CurrentRoom = DeviceManager.GetDeviceForKey(value) as EssentialsHuddleSpaceRoom;
|
||||
}
|
||||
}
|
||||
string _DefaultRoomKey;
|
||||
@@ -523,7 +523,6 @@ namespace PepperDash.Essentials
|
||||
/// <param name="e"></param>
|
||||
void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
Debug.Console(2, "UI shutdown prompt finished");
|
||||
EndMeetingButtonSig.BoolValue = false;
|
||||
}
|
||||
@@ -638,6 +637,7 @@ namespace PepperDash.Essentials
|
||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||
_CurrentRoom.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
|
||||
}
|
||||
|
||||
_CurrentRoom = room;
|
||||
|
||||
if (_CurrentRoom != null)
|
||||
@@ -679,7 +679,9 @@ namespace PepperDash.Essentials
|
||||
_CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
|
||||
|
||||
// Link up all the change events from the room
|
||||
Debug.Console(2, "UI -- Room is already on={0} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", _CurrentRoom.OnFeedback.BoolValue);
|
||||
_CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
|
||||
CurrentRoom_SyncOnFeedback();
|
||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||
_CurrentRoom.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
|
||||
|
||||
@@ -699,6 +701,11 @@ namespace PepperDash.Essentials
|
||||
/// For room on/off changes
|
||||
/// </summary>
|
||||
void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
CurrentRoom_SyncOnFeedback();
|
||||
}
|
||||
|
||||
void CurrentRoom_SyncOnFeedback()
|
||||
{
|
||||
var value = _CurrentRoom.OnFeedback.BoolValue;
|
||||
Debug.Console(2, CurrentRoom, "UI: Is on event={0}", value);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user