4339ebb310
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2968 f9c3cf11-9bcb-44bc-f272-b75c42450872
27 lines
343 B
C++
27 lines
343 B
C++
#ifndef ModeFilter_h
|
|
#define ModeFilter_h
|
|
|
|
#define MOD_FILTER_SIZE 6
|
|
|
|
#include <inttypes.h>
|
|
|
|
class ModeFilter
|
|
{
|
|
private:
|
|
public:
|
|
ModeFilter();
|
|
|
|
int get_filtered_with_sample(int _sample);
|
|
int16_t _samples[MOD_FILTER_SIZE];
|
|
|
|
private:
|
|
void isort();
|
|
int16_t mode();
|
|
int8_t _sample_index;
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|