Skip to content

power: Improve battery warning debounce logic

Despite the debounce logic introduced in !210 (merged) (60621b90), GSD kept warning me of the battery level every time my Logitech K600 keyboard (via Unifying receiver) disconnects/reconnects.

Added another condition: when battery level drops to UP_DEVICE_LEVEL_NONE, the previous entry in the hash table should not be overwritten. This avoids duplicated warnings when transitioning between NONE->LOW->NONE->LOW.

Edited by Marti Raudsepp

Merge request reports