From f173450055b8bb9a1f3a566ada203e682a915f58 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 8 May 2021 11:28:30 -0500 Subject: [PATCH] resolve #555; DJIwarning only if OSD defined * fixes for FC without OSD --- src/main/interface/msp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index b3d7e7d956..5ce45e373d 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -768,10 +768,12 @@ bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) { case MSP_NAME: { // Show warning for DJI OSD instead of pilot name // works if osd warnings enabled, osd_warn_dji is on and usb is not connected + #ifdef USE_OSD if (osdWarnGetState(OSD_WARNING_DJI)) { sbufWriteString(dst, djiWarningBuffer); break; } + #endif const int nameLen = strlen(pilotConfig()->name); for (int i = 0; i < nameLen; i++) { sbufWriteU8(dst, pilotConfig()->name[i]);