Make average filtering of HF meas path an integer calculation

This commit is contained in:
Mario Hüttel 2020-02-08 19:18:47 +01:00
parent c32bb559f3
commit 1f5a535076

View File

@ -263,7 +263,7 @@ static inline __attribute__((optimize("O3"))) float adc_pt1000_dma_avg_pre_filte
sum = sum - (uint32_t)max_val - (uint32_t)min_val; sum = sum - (uint32_t)max_val - (uint32_t)min_val;
/* Divide to get average and return */ /* Divide to get average and return */
return (float)sum / (ADC_PT1000_DMA_AVG_SAMPLES-2); return (float)(sum / (ADC_PT1000_DMA_AVG_SAMPLES-2));
} }
void ADC_IRQHandler(void) void ADC_IRQHandler(void)