A 10-Point moving average filter that returns a float each time a new value is added to the moving average array.

Fork of MovingAverageFilter by Karim Azzouz

Committer:
KarimAzzouz
Date:
Wed Dec 26 10:44:34 2012 +0000
Revision:
0:c1b48befe066
Child:
1:fbc57eb4e61d
Initial Commit!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KarimAzzouz 0:c1b48befe066 1 #ifndef MAF_H
KarimAzzouz 0:c1b48befe066 2 #define MAF_H
KarimAzzouz 0:c1b48befe066 3
KarimAzzouz 0:c1b48befe066 4 #include "mbed.h"
KarimAzzouz 0:c1b48befe066 5
KarimAzzouz 0:c1b48befe066 6 class MAF {
KarimAzzouz 0:c1b48befe066 7
KarimAzzouz 0:c1b48befe066 8 public:
KarimAzzouz 0:c1b48befe066 9 MAF(void);
KarimAzzouz 0:c1b48befe066 10 float update(float data);
KarimAzzouz 0:c1b48befe066 11
KarimAzzouz 0:c1b48befe066 12 private :
KarimAzzouz 0:c1b48befe066 13 float _k[4];
KarimAzzouz 0:c1b48befe066 14 float _result;
KarimAzzouz 0:c1b48befe066 15 };
KarimAzzouz 0:c1b48befe066 16
KarimAzzouz 0:c1b48befe066 17 #endif