#ifndef _HELPFUNCTIONS_H_ #define _HELPFUNCTIONS_H_ //#include "definitions.h" int sort_desc(const void *cmp1, const void *cmp2); float filterMedian(int16_t* values); int sort_desc(const void *cmp1, const void *cmp2) //compare function for qsort { float a = *((float *)cmp1); float b = *((float *)cmp2); return a > b ? -1 : (a < b ? 1 : 0); } float filterMedian(int16_t* values) { float copied_values[CURRENT_FILTER_SIZE]; for(int i=0;i