1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Core temperature can be negative

This commit is contained in:
jflyper 2018-02-28 08:06:53 +09:00
parent b0ff928afd
commit 122a967c24
3 changed files with 3 additions and 3 deletions

View file

@ -3015,7 +3015,7 @@ static void cliStatus(char *cmdline)
#ifdef USE_ADC_INTERNAL #ifdef USE_ADC_INTERNAL
uint16_t vrefintMv = getVrefMv(); uint16_t vrefintMv = getVrefMv();
uint16_t coretemp = getCoreTemperatureCelsius(); int16_t coretemp = getCoreTemperatureCelsius();
cliPrintf(", Vref=%d.%2dV, Core temp=%ddegC", vrefintMv / 1000, (vrefintMv % 1000) / 10, coretemp); cliPrintf(", Vref=%d.%2dV, Core temp=%ddegC", vrefintMv / 1000, (vrefintMv % 1000) / 10, coretemp);
#endif #endif

View file

@ -65,7 +65,7 @@ uint16_t getVrefMv(void)
#endif #endif
} }
uint16_t getCoreTemperatureCelsius(void) int16_t getCoreTemperatureCelsius(void)
{ {
return coreTemperature; return coreTemperature;
} }

View file

@ -21,5 +21,5 @@
void adcInternalInit(void); void adcInternalInit(void);
void adcInternalProcess(timeUs_t currentTimeUs); void adcInternalProcess(timeUs_t currentTimeUs);
uint16_t getCoreTemperatureCelsius(void); int16_t getCoreTemperatureCelsius(void);
uint16_t getVrefMv(void); uint16_t getVrefMv(void);