17 int16_t
rangevalue[] = {31000, 31000, 50, 55, 60, 55, 10, 0, 31000};
30 hal.
console->
printf(
"ArduPilot ModeFilter library test ver 1.0\n\n");
39 static uint8_t next_num = 0;
40 static int32_t raw_temp = 0;
42 uint16_t _temp_sensor;
48 _temp_sensor = buf[0];
49 _temp_sensor = (_temp_sensor << 8) | buf[1];
51 raw_temp = _temp_filter.
apply(_temp_sensor);
63 for (uint8_t j = 0; j < 0xFF; j++) {
AP_HAL::UARTDriver * console
virtual T apply(T sample)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
virtual void delay(uint16_t ms)=0
virtual void printf(const char *,...) FMT_PRINTF(2
AverageFilterUInt16_Size4 _temp_filter
A class to apply a mode filter which is basically picking the median value from the last x samples th...
A class to provide the average of a number of samples.
ModeFilterInt16_Size5 mfilter(2)
float filter(float input)
AP_HAL::Scheduler * scheduler