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