summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/battery/BatteryController.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h
index a94adaad..21caffec 100644
--- a/src/components/battery/BatteryController.h
+++ b/src/components/battery/BatteryController.h
@@ -21,7 +21,7 @@ namespace Pinetime {
}
float GetAverage() const {
- float sum = std::accumulate(arr.begin(), arr.end(), 0);
+ float sum = std::accumulate(arr.begin(), arr.end(), 0.0f);
return (sum / sz);
}
@@ -31,6 +31,7 @@ namespace Pinetime {
uint8_t cap;
uint8_t loc;
};
+
class Battery {
public:
void Init();