added threshold
This commit is contained in:
parent
3381d68baa
commit
81c060874f
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,7 @@ namespace Pinetime {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BatteryIsLow() const {
|
bool BatteryIsLow() const {
|
||||||
return false;
|
return percentRemaining <= lowBatteryThreshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsCharging() const {
|
bool IsCharging() const {
|
||||||
|
@ -53,6 +53,8 @@ namespace Pinetime {
|
||||||
//void SaadcEventHandler(nrfx_saadc_evt_t const* p_event);
|
//void SaadcEventHandler(nrfx_saadc_evt_t const* p_event);
|
||||||
//static void AdcCallbackStatic(nrfx_saadc_evt_t const* event);
|
//static void AdcCallbackStatic(nrfx_saadc_evt_t const* event);
|
||||||
|
|
||||||
|
static constexpr uint8_t lowBatteryThreshold {20};
|
||||||
|
|
||||||
bool isReading = false;
|
bool isReading = false;
|
||||||
|
|
||||||
Pinetime::System::SystemTask* systemTask = nullptr;
|
Pinetime::System::SystemTask* systemTask = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue