summaryrefslogtreecommitdiff
path: root/src/components/battery/BatteryController.h
diff options
context:
space:
mode:
authorJF <JF002@users.noreply.github.com>2021-10-09 18:11:31 (GMT)
committerGitHub <noreply@github.com>2021-10-09 18:11:31 (GMT)
commitb969272c90bfbfa8ae7234809a896ba62411f797 (patch)
tree56e0d4f2af2e5b74d6050d74884a64076cdbdba1 /src/components/battery/BatteryController.h
parentc99feeea312f911e17b133a93c208caa88cb7b03 (diff)
parent1777b9dee8f1189df29f627707b970995f0d4afe (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.h4
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();