PowerStatus: add state "Not charging"

some laptops decide to not charge a fast full battery to not consume a cycle.
In this discharging state, the current rate is zero, thus no time left can be computed.
We add a state "Not charging" to clearly differentiate and avoid user confusion.
PowerStatus was triggering low battery notifications, this is also fixed.

Change-Id: I4745c78eb0863ab01fe34cb065707d068cff0f0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7300
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Jérôme Duval
2024-01-09 04:07:05 +00:00
committed by waddlesplash
parent bb09458028
commit 96bad7685b
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -30,6 +30,7 @@ const uint32 kMagicACPIBatteryID = 17822;
#define BATTERY_DISCHARGING 0x01
#define BATTERY_CHARGING 0x02
#define BATTERY_CRITICAL_STATE 0x04
#define BATTERY_NOT_CHARGING 0x08
#define BATTERY_MAX_STRING_LENGTH 32