Better coprocessor temperature support

This commit is contained in:
romolo.manfredini@gmail.com
2012-10-03 21:05:56 +00:00
parent b4a9d62b22
commit fa97e9366d
4 changed files with 26 additions and 9 deletions
+2
View File
@@ -1035,6 +1035,8 @@ void read_9_adc()
#endif
temperature = (((int32_t)temperature * 7) + ((((int32_t)ADC->ADC_CDR15 - 838) * 621) >> 11)) >> 3; // Filter it
if (get_tmr10ms()<100)
return;
if (temperature < 200 && temperature > maxTemperature) {
maxTemperature = temperature;
}