Make average calculation floating point.
This commit is contained in:
parent
8bbc2e60f8
commit
48fea3d36e
@ -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;
|
||||
|
||||
/* Divide to get average and return */
|
||||
return (float)(sum / (ADC_PT1000_DMA_AVG_SAMPLES-2));
|
||||
return (float)sum / (float)(ADC_PT1000_DMA_AVG_SAMPLES-2);
|
||||
}
|
||||
|
||||
void ADC_IRQHandler(void)
|
||||
|
Loading…
Reference in New Issue
Block a user