Class to calculate the rolling average of a signal.
More...
#include <ctre/phoenix/signals/MovingAverage.h>
Class to calculate the rolling average of a signal.
◆ MovingAverage()
ctre::phoenix::signals::MovingAverage::MovingAverage |
( |
int |
capacity | ) |
|
|
inline |
Constructor for a MovingAverage Object.
- Parameters
-
capacity | maximum number of items this will hold |
◆ Clear()
void ctre::phoenix::signals::MovingAverage::Clear |
( |
| ) |
|
|
inline |
◆ GetCount()
int ctre::phoenix::signals::MovingAverage::GetCount |
( |
| ) |
|
|
inline |
- Returns
- the count of the items
◆ GetSum()
float ctre::phoenix::signals::MovingAverage::GetSum |
( |
| ) |
|
|
inline |
- Returns
- the sum of the items
◆ Pop()
void ctre::phoenix::signals::MovingAverage::Pop |
( |
| ) |
|
|
inline |
◆ Process()
float ctre::phoenix::signals::MovingAverage::Process |
( |
float |
input | ) |
|
|
inline |
Add input & calculate average.
- Parameters
-
- Returns
- new average
◆ Push()
void ctre::phoenix::signals::MovingAverage::Push |
( |
float |
d | ) |
|
|
inline |
The documentation for this class was generated from the following file: