summaryrefslogtreecommitdiff
path: root/src/components/battery/BatteryController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/battery/BatteryController.cpp')
-rw-r--r--src/components/battery/BatteryController.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp
index beca95c..4a7a234 100644
--- a/src/components/battery/BatteryController.cpp
+++ b/src/components/battery/BatteryController.cpp
@@ -66,6 +66,8 @@ void Battery::SaadcEventHandler(nrfx_saadc_evt_t const * p_event) {
percentRemaining = std::max(percentRemaining, 0);
percentRemaining = std::min(percentRemaining, 100);
+ percentRemainingBuffer.insert(percentRemaining);
+
nrfx_saadc_uninit();
}
}
@@ -73,11 +75,3 @@ void Battery::SaadcEventHandler(nrfx_saadc_evt_t const * p_event) {
void Battery::adcCallbackStatic(nrfx_saadc_evt_t const *event) {
instance->SaadcEventHandler(event);
}
-
-int Battery::PercentRemaining() {
- return percentRemaining;
-}
-
-float Battery::Voltage() {
- return voltage;
-} \ No newline at end of file