mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 20:47:04 +00:00
Updates to finesse screen saver and get phone/video number display working correclty
This commit is contained in:
parent
d6581cab2e
commit
b7c9677c7a
3 changed files with 43 additions and 13 deletions
|
|
@ -20,7 +20,7 @@ namespace PepperDash.Essentials
|
|||
|
||||
List<uint> PositionJoins;
|
||||
|
||||
int CurrentPositionIndex;
|
||||
int CurrentPositionIndex = 0;
|
||||
|
||||
public ScreenSaverController(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
|
||||
: base(parent.TriList)
|
||||
|
|
@ -39,6 +39,8 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
|
||||
|
||||
CurrentPositionIndex = 0;
|
||||
SetCurrentPosition();
|
||||
StartPositionTimer();
|
||||
|
||||
base.Show();
|
||||
|
|
@ -64,13 +66,26 @@ namespace PepperDash.Essentials
|
|||
if (PositionTimer == null)
|
||||
{
|
||||
PositionTimer = new CTimer((o) => PositionTimerExpired(), PositionTimeoutMs);
|
||||
SetCurrentPosition();
|
||||
}
|
||||
else
|
||||
{
|
||||
PositionTimer.Reset(PositionTimeoutMs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PositionTimerExpired()
|
||||
{
|
||||
if (CurrentPositionIndex <= PositionJoins.Count)
|
||||
IncrementPositionIndex();
|
||||
|
||||
SetCurrentPosition();
|
||||
|
||||
StartPositionTimer();
|
||||
}
|
||||
|
||||
void IncrementPositionIndex()
|
||||
{
|
||||
if (CurrentPositionIndex < PositionJoins.Count - 1)
|
||||
{
|
||||
CurrentPositionIndex++;
|
||||
}
|
||||
|
|
@ -78,6 +93,8 @@ namespace PepperDash.Essentials
|
|||
{
|
||||
CurrentPositionIndex = 0;
|
||||
}
|
||||
|
||||
Debug.Console(1, "ScreenSaver Position Timer Expired: Setting new position: {0}", CurrentPositionIndex);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue