Working scheduling of ADC 🎉

This commit is contained in:
Ben V. Brown
2022-04-18 19:21:40 +10:00
parent 1d9b4d851e
commit fc1f28f2b8
9 changed files with 362 additions and 371 deletions

View File

@@ -8,7 +8,6 @@
#ifndef INC_EXPMOVINGAVERAGE_H_
#define INC_EXPMOVINGAVERAGE_H_
// max size = 127
template <class T, uint8_t weighting> struct expMovingAverage {
int32_t sum;
void update(T const val) { sum = ((val * weighting) + (sum * (256 - weighting))) / 256; }