summaryrefslogtreecommitdiff
path: root/src/Components/Battery/BatteryController.h
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2020-10-04 10:21:22 (GMT)
committerGitHub <noreply@github.com>2020-10-04 10:21:22 (GMT)
commit39954bbd3afb592a0c3109e3479594183e8d0778 (patch)
tree58efd04aa38b8dc7989c51fe3c9cdb9a3fb46a54 /src/Components/Battery/BatteryController.h
parent5adc97702c326d0252df6da75ce4ac244a4b3553 (diff)
parent6c86d1d9d706706fcb6f214aba8259e61ed68755 (diff)
Merge pull request #68 from Avamander/patch-1
Rename folders to follow a consistent style
Diffstat (limited to 'src/Components/Battery/BatteryController.h')
-rw-r--r--src/Components/Battery/BatteryController.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/Components/Battery/BatteryController.h b/src/Components/Battery/BatteryController.h
deleted file mode 100644
index f07648a..0000000
--- a/src/Components/Battery/BatteryController.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-#include <drivers/include/nrfx_saadc.h>
-
-
-namespace Pinetime {
- namespace Controllers {
- class Battery {
- public:
- void Init();
- void Update();
- float PercentRemaining() const { return percentRemaining; }
- float Voltage() const { return voltage; }
- bool IsCharging() const { return isCharging; }
- bool IsPowerPresent() const { return isPowerPresent; }
-
- private:
- static constexpr uint32_t chargingPin = 12;
- static constexpr uint32_t powerPresentPin = 19;
- static constexpr nrf_saadc_input_t batteryVoltageAdcInput = NRF_SAADC_INPUT_AIN7;
- static void SaadcEventHandler(nrfx_saadc_evt_t const * p_event);
- float percentRemaining = 0.0f;
- float voltage = 0.0f;
- bool isCharging = false;
- bool isPowerPresent = false;
- };
- }
-} \ No newline at end of file