mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-1227 Fix high CPU usage: Apply missing parenthesis to prevent a fdiv for temp calculatin
This commit is contained in:
parent
a9f1d55fea
commit
7acb0ad385
@ -33,7 +33,7 @@
|
||||
// defines for Temp measurements
|
||||
#define PIOS_ADC_STM32_TEMP_V25 1.43f /* V */
|
||||
#define PIOS_ADC_STM32_TEMP_AVG_SLOPE 4.3f /* mV/C */
|
||||
#define PIOS_CONVERT_VOLT_TO_CPU_TEMP(x) ((PIOS_ADC_STM32_TEMP_V25 - x) * 1000.0f / PIOS_ADC_STM32_TEMP_AVG_SLOPE + 25.0f)
|
||||
#define PIOS_CONVERT_VOLT_TO_CPU_TEMP(x) ((PIOS_ADC_STM32_TEMP_V25 - x) * (1000.0f / PIOS_ADC_STM32_TEMP_AVG_SLOPE) + 25.0f)
|
||||
|
||||
|
||||
#endif /* PIOS_ARCHITECTURE_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user