58 return _sum / (float) _cnt;
Class to calculate the rolling average of a signal.
Definition: MovingAverage.h:32
void Pop()
Pull out oldest item.
Definition: MovingAverage.h:91
float Process(float input)
Add input & calculate average.
Definition: MovingAverage.h:56
MovingAverage(int capacity)
Constructor for a MovingAverage Object.
Definition: MovingAverage.h:46
void Push(float d)
Add new item.
Definition: MovingAverage.h:74
int GetCount()
Definition: MovingAverage.h:113
float GetSum()
Definition: MovingAverage.h:107
void Clear()
Clears all data points.
Definition: MovingAverage.h:63
namespace ctre
Definition: paramEnum.h:5