diff options
| author | Mark Russell <mruss660@gmail.com> | 2021-09-16 20:20:39 (GMT) |
|---|---|---|
| committer | Mark Russell <mruss660@gmail.com> | 2021-09-16 20:20:39 (GMT) |
| commit | b9e56843a29672b2befa65bf036f6db21078291f (patch) | |
| tree | c2fa91e352127c09abd0f9b4959cd1f47d628ea8 /src/components/battery/BatteryController.h | |
| parent | cdf99b08f42c3826a8608d756bc7cda0a476ed98 (diff) | |
| parent | 3eb73774a39e255cd4b5de76441a59f1525a989c (diff) | |
resolve conflict in src/systemtask/Messages.h
Diffstat (limited to 'src/components/battery/BatteryController.h')
| -rw-r--r-- | src/components/battery/BatteryController.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 6f09b73..8af27ea 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; @@ -34,8 +33,6 @@ namespace Pinetime { static Battery* instance; nrf_saadc_value_t saadc_value; - static constexpr uint32_t chargingPin = 12; - static constexpr uint32_t powerPresentPin = 19; static constexpr nrf_saadc_input_t batteryVoltageAdcInput = NRF_SAADC_INPUT_AIN7; uint16_t voltage = 0; uint8_t percentRemaining = 0; @@ -49,6 +46,8 @@ namespace Pinetime { static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); bool isReading = false; + + Pinetime::System::SystemTask* systemTask = nullptr; }; } } |
