diff options
author | minacode <minamoto9@web.de> | 2022-11-20 13:16:28 +0100 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2022-12-27 12:13:52 +0100 |
commit | 51d818b7742a0224abdbc9f55885ada9c353d6df (patch) | |
tree | 7f35b1517f90f2d7f9f9c3c757915c2f541d1368 /src | |
parent | 60027f217ccf13f0503658b6bfa2613bfa406a12 (diff) |
fixed a comment, set threshold to 15%
Diffstat (limited to 'src')
-rw-r--r-- | src/components/battery/BatteryController.cpp | 2 | ||||
-rw-r--r-- | src/components/battery/BatteryController.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp index a64ea076..79829360 100644 --- a/src/components/battery/BatteryController.cpp +++ b/src/components/battery/BatteryController.cpp @@ -92,7 +92,7 @@ void Battery::SaadcEventHandler(nrfx_saadc_evt_t const* p_event) { percentRemaining = newPercent; systemTask->PushMessage(System::Messages::BatteryPercentageUpdated); - // warn at 20% battery (wrt. rescaling above) + // warn about low battery when not charging and below threshold if (!isPowerPresent && BatteryIsLow() && lastPercentRemaining > lowBatteryThreshold) { systemTask->PushMessage(System::Messages::LowBattery); } diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index df592232..3a7d73ce 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -54,7 +54,7 @@ namespace Pinetime { void SaadcEventHandler(nrfx_saadc_evt_t const* p_event); static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); - static constexpr uint8_t lowBatteryThreshold {20}; + static constexpr uint8_t lowBatteryThreshold {15}; bool isReading = false; |