1 #include "EMACurrentSampler.h" 2 #include "VIPCalculation.h" 8 const uint16_t periodMs,
19 return currentConversion(
average(), _vSupply, _vRef, _iOffset);
24 return currentConversion(
last(), _vSupply, _vRef, _iOffset);
virtual float averageAmps()
Get the mean value in the sample set.
Exponential Moving Average (EMA) analog pin sampler.
virtual float lastAmps()
Get the most recent voltage value.
EMACurrentSampler(const uint8_t pin, const float vSupply, const float vRef, const float iOffset, const uint16_t periodMs, const float alpha)