Example #1
0
 public override void PowerOn()
 {
     if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
     {
         _IsWarmingUp = true;
         IsWarmingUpFeedback.InvokeFireUpdate();
         // Fake power-up cycle
         WarmupTimer = new CTimer(o =>
         {
             _IsWarmingUp = false;
             _PowerIsOn   = true;
             IsWarmingUpFeedback.InvokeFireUpdate();
             PowerIsOnFeedback.InvokeFireUpdate();
         }, WarmupTime);
     }
 }
Example #2
0
 public override void PowerOff()
 {
     // If a display has unreliable-power off feedback, just override this and
     // remove this check.
     if (PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
     {
         _IsCoolingDown = true;
         _PowerIsOn     = false;
         PowerIsOnFeedback.InvokeFireUpdate();
         IsCoolingDownFeedback.InvokeFireUpdate();
         // Fake cool-down cycle
         CooldownTimer = new CTimer(o =>
         {
             Debug.Console(2, this, "Cooldown timer ending");
             _IsCoolingDown = false;
             IsCoolingDownFeedback.InvokeFireUpdate();
         }, CooldownTime);
     }
 }