Skip to content

Commit

Permalink
fix: set PowerOff method to not do anything if power is off already
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welker committed Jul 3, 2024
1 parent 20d82eb commit 81f01bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SamsungMdc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ public override bool CustomActivate()
{
Communication.Connect();

(o, a) => Debug.Console(DebugLevelVerbose, this, "Communication monitor state: {0}", CommunicationMonitor.Status);
CommunicationMonitor.Start();
return true;
}
Expand Down Expand Up @@ -846,7 +845,7 @@ public override void PowerOff()
_isPoweringOnIgnorePowerFb = false;
// If a display has unreliable-power off feedback, just override this and
// remove this check.
if (!_isWarmingUp && !_isCoolingDown) // PowerIsOnFeedback.BoolValue &&
if (!_isWarmingUp && !_isCoolingDown && _powerIsOn) // PowerIsOnFeedback.BoolValue &&
{
SendBytes(new byte[] { SamsungMdcCommands.Header, SamsungMdcCommands.PowerControl, 0x00, 0x01, SamsungMdcCommands.PowerOff, 0x00 });
_isCoolingDown = true;
Expand Down

0 comments on commit 81f01bb

Please sign in to comment.