占位符
/* 加权平均滤波 */
static unsigned char coe[] = {,,,,,,,,,,,,};
static unsigned int coeSum= ++++++++++++;
unsigned long temp = ; for (i = ; i<ADCN; i++)
{
temp += arr[i]*coe[i];
}
temp = (unsigned long )( temp * 1.0 / coeSum);
占位符
/* 中值滤波 */
unsigned long temp = ; // 选择排序
for (i = ; i<ADCN-; i++)
{
k = i;
for (j = i+; j<ADCN; j++)
{
if (arr[j] < arr[k])
k = j;
}
if (k != i)
{
temp = arr[k];
arr[k] = arr[i];
arr[i] = temp;
}
}
temp = arr[ (ADCN - ) / ]; //返回中值