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:
commit
9a4a3507f2
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue