We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 535ed3c + 81c0608 commit 02b75a8Copy full SHA for 02b75a8
1 file changed
sim/components/battery/BatteryController.h
@@ -21,6 +21,10 @@ namespace Pinetime {
21
return voltage;
22
}
23
24
+ bool BatteryIsLow() const {
25
+ return percentRemaining <= lowBatteryThreshold;
26
+ }
27
+
28
bool IsCharging() const {
29
// isCharging will go up and down when fully charged
30
// isFull makes sure this returns false while fully charged.
@@ -49,6 +53,8 @@ namespace Pinetime {
49
53
//void SaadcEventHandler(nrfx_saadc_evt_t const* p_event);
50
54
//static void AdcCallbackStatic(nrfx_saadc_evt_t const* event);
51
55
56
+ static constexpr uint8_t lowBatteryThreshold {20};
57
52
58
bool isReading = false;
59
60
Pinetime::System::SystemTask* systemTask = nullptr;
0 commit comments