From 81f01bb5684cb01e008e80354f6da88c9348dc6f Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 3 Jul 2024 15:35:00 -0500 Subject: [PATCH] fix: set PowerOff method to not do anything if power is off already --- src/SamsungMdc.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SamsungMdc.cs b/src/SamsungMdc.cs index 409c1ee..123231b 100644 --- a/src/SamsungMdc.cs +++ b/src/SamsungMdc.cs @@ -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; } @@ -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;