From 6fa8b5d611c9db7d4267f40c008368e8d6f1d430 Mon Sep 17 00:00:00 2001 From: Tim Gromeyer Date: Sun, 9 Mar 2025 20:38:44 +0100 Subject: [PATCH] [Linux] ble - fix charging state was inverted --- linux/ble/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/ble/main.cpp b/linux/ble/main.cpp index f4504a4..b505ec6 100644 --- a/linux/ble/main.cpp +++ b/linux/ble/main.cpp @@ -220,9 +220,9 @@ private slots: // Parse charging status and case battery level (byte 7) quint8 statusByte = static_cast(data[7]); - deviceInfo.caseCharging = (statusByte & 0x02) != 0; - deviceInfo.rightCharging = (statusByte & 0x04) != 0; - deviceInfo.leftCharging = (statusByte & 0x08) != 0; + deviceInfo.caseCharging = (statusByte & 0x02) == 0; + deviceInfo.rightCharging = (statusByte & 0x04) == 0; + deviceInfo.leftCharging = (statusByte & 0x08) == 0; deviceInfo.caseBattery = ((statusByte >> 4) & 0x0F) * 10; // Scale to 0-100 // Byte 8 is the lid open counter