zmk/app/module/drivers/sensor/battery
MickiusMousius 5ceaa1b879 Fix: Use a lookup table & interpolation to better estimate remaining battery capacity
The old battery capacity estimate code uses a linear approximation to estimate the remaining battery capacity. This is computationally very efficient, however, the estimate is very inaccurate once below 60%.

This change uses a small table of bounded functions to provide a more accurate estimate of remaining capacity. The values in the table re-implement the old estimation "curve".
2025-04-13 14:01:48 +09:30
..
CMakeLists.txt refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00
Kconfig refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00
battery_common.c Fix: Use a lookup table & interpolation to better estimate remaining battery capacity 2025-04-13 14:01:48 +09:30
battery_common.h refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00
battery_nrf_vddh.c refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00
battery_voltage_divider.c refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00