Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sim/components/battery/BatteryController.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Pinetime {
return voltage;
}

bool BatteryIsLow() const {
return percentRemaining <= lowBatteryThreshold;
}

bool IsCharging() const {
// isCharging will go up and down when fully charged
// isFull makes sure this returns false while fully charged.
Expand Down Expand Up @@ -49,6 +53,8 @@ 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};

bool isReading = false;

Pinetime::System::SystemTask* systemTask = nullptr;
Expand Down