mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
[Linux] Remember battery state (closes #149)
This commit is contained in:
committed by
Tim Gromeyer
parent
91ffaaa972
commit
c0d915666b
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user