mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-02 22:34:57 +00:00
Logo loading; troublshooting power/sleep hiccuo
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -24,6 +24,7 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
|
||||
|
||||
bool _PowerIsOn;
|
||||
bool _PowerValueIncomingWaitingForCheck;
|
||||
bool _IsWarmingUp;
|
||||
bool _IsCoolingDown;
|
||||
ushort _VolumeLevelForSig;
|
||||
@@ -232,17 +233,18 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
/// </summary>
|
||||
void UpdatePowerFB(byte pb)
|
||||
{
|
||||
var newVal = pb == 1;
|
||||
Debug.Console(2, this, "*#* NEW POWER STATE={0}, CURRENT={1}", newVal, _PowerIsOn);
|
||||
if (newVal != _PowerIsOn)
|
||||
_PowerValueIncomingWaitingForCheck = pb == 1;
|
||||
Debug.Console(2, this, "*#* NEW POWER STATE={0}, CURRENT={1}",
|
||||
_PowerValueIncomingWaitingForCheck, _PowerIsOn);
|
||||
if (_PowerValueIncomingWaitingForCheck != _PowerIsOn)
|
||||
{
|
||||
CrestronInvoke.BeginInvoke(o =>
|
||||
{
|
||||
CrestronEnvironment.Sleep(2500);
|
||||
Debug.Console(2, this, "*#* NEW POWER STATE AFTER PAUSE={0} CURRENT={1}", newVal, _PowerIsOn);
|
||||
if (newVal != _PowerIsOn)
|
||||
Debug.Console(2, this, "*#* NEW POWER STATE AFTER PAUSE={0} CURRENT={1}", _PowerValueIncomingWaitingForCheck, _PowerIsOn);
|
||||
if (_PowerValueIncomingWaitingForCheck != _PowerIsOn)
|
||||
{
|
||||
_PowerIsOn = newVal;
|
||||
_PowerIsOn = _PowerValueIncomingWaitingForCheck;
|
||||
PowerIsOnFeedback.FireUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -45,6 +45,8 @@ namespace PepperDash.Essentials
|
||||
public int ShutdownVacancySeconds { get; set; }
|
||||
public ShutdownType ShutdownType { get; private set; }
|
||||
|
||||
public string LogoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace PepperDash.Essentials
|
||||
var disp = DeviceManager.GetDeviceForKey(props.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||
var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching;
|
||||
var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props);
|
||||
huddle.LogoUrl = props.Logo.GetUrl();
|
||||
huddle.SourceListKey = props.SourceListKey;
|
||||
huddle.DefaultSourceItem = props.DefaultSourceItem;
|
||||
return huddle;
|
||||
@@ -48,7 +49,6 @@ namespace PepperDash.Essentials
|
||||
// Get the master volume control
|
||||
IBasicVolumeWithFeedback masterVolumeControlDev = props.Volumes.Master.GetDevice();
|
||||
|
||||
#warning Will need to define audio routing somewhere as well
|
||||
|
||||
var presRoom = new EssentialsPresentationRoom(Key, Name, displaysDict, masterVolumeControlDev, props);
|
||||
return presRoom;
|
||||
@@ -67,8 +67,28 @@ namespace PepperDash.Essentials
|
||||
public int ShutdownVacancySeconds { get; set; }
|
||||
public int ShutdownPromptSeconds { get; set; }
|
||||
public EssentialsRoomOccSensorConfig OccupancySensors { get; set; }
|
||||
public EssentialsLogoPropertiesConfig Logo { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class EssentialsLogoPropertiesConfig
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public string Url { get; set; }
|
||||
/// <summary>
|
||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||
/// </summary>
|
||||
public string GetUrl()
|
||||
{
|
||||
if (Type == "url")
|
||||
return Url;
|
||||
if (Type == "system")
|
||||
return string.Format("http://{0}:5646/logo",
|
||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents occupancy sensor(s) setup for a room
|
||||
/// </summary>
|
||||
|
||||
@@ -179,8 +179,6 @@ namespace PepperDash.Essentials
|
||||
|
||||
TriList.StringInput[UIStringJoin.StartActivityText].StringValue =
|
||||
"Tap Share to begin";
|
||||
|
||||
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -677,8 +675,21 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
SourcesSrl.Count = (ushort)(i - 1);
|
||||
}
|
||||
|
||||
// Name and logo
|
||||
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
|
||||
if (_CurrentRoom.LogoUrl == null)
|
||||
{
|
||||
Debug.Console(2, _CurrentRoom, "Using default logo");
|
||||
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
|
||||
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(2, _CurrentRoom, "Using logo at URL: {0}", _CurrentRoom.LogoUrl);
|
||||
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true;
|
||||
TriList.StringInput[UIStringJoin.LogoUrl].StringValue = _CurrentRoom.LogoUrl;
|
||||
}
|
||||
|
||||
// Shutdown timer
|
||||
_CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user