Protect ESC telemetry features in osd.c by USE_ESC_SENSOR

This commit is contained in:
jflyper 2018-10-22 04:04:39 +09:00
parent 70723bdcfe
commit 849024ce59
1 changed files with 2 additions and 0 deletions

View File

@ -1556,6 +1556,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);
@ -1565,6 +1566,7 @@ static void osdShowStats(uint16_t endBatteryVoltage)
itoa(stats.max_esc_rpm, buff, 10);
osdDisplayStatisticLabel(top++, "MAX ESC RPM", buff);
}
#endif
}