Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LSM9DS1 RangeFinder FastPWM
Dependents: PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board ... more
AvgFilter.h
- Committer:
- pmic
- Date:
- 2022-05-05
- Revision:
- 26:6c326a352f1b
- Parent:
- 24:f2614d8577a1
- Child:
- 27:fdb94d0b5d87
File content as of revision 26:6c326a352f1b:
#ifndef AVGFILTER_H_ #define AVGFILTER_H_ #include <mbed.h> class AvgFilter { public: AvgFilter(){}; AvgFilter(uint8_t _N); virtual ~AvgFilter(); void setup(uint8_t _N); void reset(); float update(float _inp); private: float m_avg; uint8_t m_N; uint8_t m_idx; float *m_ring_buffer; }; #endif /* AVGFILTER_H_ */