diff options
author | JF002 <JF002@users.noreply.github.com> | 2021-09-12 18:22:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 18:22:04 +0200 |
commit | f0329298ac4171e1c117bbf4ae2394f2b9769348 (patch) | |
tree | 7807daa81cb5bafc1f90f86a62bfe4f4c5505fbe /src/components/battery/BatteryController.h | |
parent | 977321cf6457eefed7fe0cea0fb9b94c2fddf7fd (diff) | |
parent | 21d37d1e234b217b3e71dc65eb19db197ee21bad (diff) |
Merge pull request #580 from Riksu9000/timer_battery_reading
Make battery reading periodic
Diffstat (limited to 'src/components/battery/BatteryController.h')
-rw-r--r-- | src/components/battery/BatteryController.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 6f09b737..ad304eba 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -1,8 +1,7 @@ #pragma once #include <cstdint> #include <drivers/include/nrfx_saadc.h> -#include <array> -#include <numeric> +#include <systemtask/SystemTask.h> namespace Pinetime { namespace Controllers { @@ -11,8 +10,8 @@ namespace Pinetime { public: Battery(); - void Init(); void Update(); + void Register(System::SystemTask* systemTask); uint8_t PercentRemaining() const { return percentRemaining; @@ -49,6 +48,8 @@ namespace Pinetime { static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); bool isReading = false; + + Pinetime::System::SystemTask* systemTask = nullptr; }; } } |