diff options
| author | JF <JF002@users.noreply.github.com> | 2021-10-09 18:11:31 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 18:11:31 (GMT) |
| commit | b969272c90bfbfa8ae7234809a896ba62411f797 (patch) | |
| tree | 56e0d4f2af2e5b74d6050d74884a64076cdbdba1 /src/components/battery/BatteryController.h | |
| parent | c99feeea312f911e17b133a93c208caa88cb7b03 (diff) | |
| parent | 1777b9dee8f1189df29f627707b970995f0d4afe (diff) | |
Merge pull request #719 from Riksu9000/improve_battery_reporting
Improve battery percentage calculation and reporting
Diffstat (limited to 'src/components/battery/BatteryController.h')
| -rw-r--r-- | src/components/battery/BatteryController.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index c78ffb3..5a7394c 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -10,7 +10,8 @@ namespace Pinetime { public: Battery(); - void Update(); + void ReadPowerState(); + void MeasureVoltage(); void Register(System::SystemTask* systemTask); uint8_t PercentRemaining() const { @@ -42,6 +43,7 @@ namespace Pinetime { bool isFull = false; bool isCharging = false; bool isPowerPresent = false; + bool firstMeasurement = true; void SaadcInit(); |
