From 849024ce598293fdb18f6515e9e165656a5fbb19 Mon Sep 17 00:00:00 2001 From: jflyper Date: Mon, 22 Oct 2018 04:04:39 +0900 Subject: [PATCH] Protect ESC telemetry features in osd.c by USE_ESC_SENSOR --- src/main/io/osd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/io/osd.c b/src/main/io/osd.c index dfc41763df..1bd0d6bb54 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -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 }