1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Merge pull request #6967 from jflyper/bfdev-fix-add-USE_ESC_SENSOR-conditional-to-OSD-stat-max-ESC-temp

OSD: Protect ESC stat max temp by USE_ESC_SENSOR
This commit is contained in:
Michael Keller 2018-10-24 23:43:50 +13:00 committed by GitHub
commit 9a4a3507f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1559,6 +1559,7 @@ static void osdShowStats(uint16_t endBatteryVoltage)
osdDisplayStatisticLabel(top++, "MAX G-FORCE", buff);
}
#ifdef USE_ESC_SENSOR
if (osdStatGetState(OSD_STAT_MAX_ESC_TEMP)) {
tfp_sprintf(buff, "%3d%c", osdConvertTemperatureToSelectedUnit(stats.max_esc_temp * 10) / 10, osdGetTemperatureSymbolForSelectedUnit());
osdDisplayStatisticLabel(top++, "MAX ESC TEMP", buff);
@ -1568,6 +1569,7 @@ static void osdShowStats(uint16_t endBatteryVoltage)
itoa(stats.max_esc_rpm, buff, 10);
osdDisplayStatisticLabel(top++, "MAX ESC RPM", buff);
}
#endif
}