1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 19:09:43 +00:00
Files
Mole/cmd/status
Tw93 9b3220bfe4 fix: handle uint64 overflow in battery power metrics
- Fix display of invalid large values like 18446744073709544W
- macOS ioreg returns negative values as uint64 (two's complement)
- Detect overflow pattern (value > 2^63) and convert to signed
- Validate reasonable power range (-200W to 200W) for battery
- Add range validation for SystemPower (0 to 1000W)

Root cause: During charging, battery power is negative but ioreg
formats it as unsigned uint64, causing overflow. This fix properly
converts these values back to signed integers.
2026-01-14 11:26:37 +08:00
..
2026-01-06 12:04:27 +02:00
2026-01-06 12:04:27 +02:00