From 7376c02bbfa53b41fab1c49562917d678c24848f Mon Sep 17 00:00:00 2001 From: Alex Dolzhenkov Date: Sat, 29 Oct 2022 12:20:44 +1300 Subject: Add linear approximation and use it for improving battery percentage Add linear approximation class and use it to better model the non-linear discharge curve of the battery. Changed the minimum voltage level to 3.5V and the maximum to 4.18V. For reference the maximum observed voltage is 4.21V during charging. --- src/components/battery/BatteryController.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/components/battery/BatteryController.h') diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 15559916..5a7394c4 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -49,7 +49,6 @@ namespace Pinetime { void SaadcEventHandler(nrfx_saadc_evt_t const* p_event); static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); - static uint8_t GetBatteryPercentageFromVoltage(uint16_t voltage); bool isReading = false; -- cgit v1.2.3