#include <stdint.h>
Go to the source code of this file.
|
void | Filter_Init (filter_t *f_ptr, int16_t offset, float scale) |
| Initializes all struct variables and calculates the shift based on scale input for linear transfer function. new_value = raw_value * scale + offset. More...
|
|
void | Filter_Update (int16_t raw_value, filter_t *f_ptr) |
| computes the new value after going through the transfer function and inputs it into filter buffer array More...
|
|
int16_t | Filter_Get (filter_t *f_ptr) |
| Filter_Get will retrieve the current value from the filter instance. More...
|
|
void | Filter_SetMin (filter_t *f_ptr, int16_t threshold, void(*callback)(int16_t)) |
| Filter_SetMin will set the MIN value in the filter to the threshold specified. Calls the callback function with the current value when the value drops below the threshold. More...
|
|
void | Filter_SetMax (filter_t *f_ptr, int16_t threshold, void(*callback)(int16_t)) |
| Filter_SetMin will set the MAX value in the filter to the threshold specified. Calls the callback function with the current value when the value goes above the threshold. More...
|
|
int16_t | MovingAvgFilter (int16_t *values, uint16_t index, uint16_t size, int16_t Last_Value) |
| Moving Average filter - Default filter that adds the previous X values and divides by number of values to compute a rolling mean. More...
|
|
void | Filter_SetFilter (filter_t *f_ptr, int16_t(*new_filter)(int16_t *values, uint16_t index, uint16_t size, int16_t last_value)) |
| Method that allows user to pass a function to a pointer a different type of filter (i.e IIR, FIR) More...
|
|