diff --git a/linux/battery.hpp b/linux/battery.hpp index e0defca..99119e4 100644 --- a/linux/battery.hpp +++ b/linux/battery.hpp @@ -99,7 +99,10 @@ public: auto level = static_cast(packet[offset + 2]); auto status = static_cast(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)