[Linux] Remember battery state (closes #149)

This commit is contained in:
Tim Gromeyer
2025-06-09 10:53:10 +02:00
committed by Tim Gromeyer
parent 91ffaaa972
commit c0d915666b

View File

@@ -99,7 +99,10 @@ public:
auto level = static_cast<quint8>(packet[offset + 2]);
auto status = static_cast<BatteryStatus>(packet[offset + 3]);
newStates[comp] = {level, status};
if (status != BatteryStatus::Disconnected)
{
newStates[comp] = {level, status};
}
// If this is a pod (Left or Right), add it to the list
if (comp == Component::Left || comp == Component::Right)