restore battery buffer
This commit is contained in:
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user