1 #include "BrownoutMode.h" 5 _vThreshLow(vThreshLow),
6 _vThreshHigh(vThreshHigh),
14 _DB(F(
"Mode::update, volts="));
16 if (_brownedOut && _vSampler.
averageVolts() > _vThreshHigh) {
19 }
else if (!_brownedOut && _vSampler.
averageVolts() < _vThreshLow) {
virtual void exitBrownout()
virtual float averageVolts()
Get the mean value in the sample set.
BrownoutMode(EMAVDivSampler &vSampler, const float vThreshLow, const float vThreshHigh)
virtual void enterBrownout()
Exponential Moving Average Voltage Divider based voltage sampler.