Skip to content

Commit

Permalink
resolve emuflight#555; DJIwarning only if OSD defined
Browse files Browse the repository at this point in the history
* fixes for FC without OSD
  • Loading branch information
nerdCopter committed May 8, 2021
1 parent cdb9e0e commit f173450
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/interface/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit f173450

Please sign in to comment.