We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91ffaaa commit c0d9156Copy full SHA for c0d9156
linux/battery.hpp
@@ -99,7 +99,10 @@ class Battery : public QObject
99
auto level = static_cast<quint8>(packet[offset + 2]);
100
auto status = static_cast<BatteryStatus>(packet[offset + 3]);
101
102
- newStates[comp] = {level, status};
+ if (status != BatteryStatus::Disconnected)
103
+ {
104
+ newStates[comp] = {level, status};
105
+ }
106
107
// If this is a pod (Left or Right), add it to the list
108
if (comp == Component::Left || comp == Component::Right)
0 commit comments