diff --git a/src/main/fc/config.c b/src/main/fc/config.c index 3c6a09c688..8fa8b1682b 100755 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -340,7 +340,9 @@ void processSaveConfigAndNotify(void) writeEEPROM(); readEEPROM(); beeperConfirmationBeeps(1); +#ifdef USE_OSD osdShowEEPROMSavedNotification(); +#endif } void writeEEPROM(void) @@ -370,7 +372,9 @@ void ensureEEPROMContainsValidData(void) */ void saveConfigAndNotify(void) { +#ifdef USE_OSD osdStartedSaveProcess(); +#endif saveState = SAVESTATE_SAVEANDNOTIFY; } diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index d9c0ce5a37..8d66f9a815 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -3240,8 +3240,12 @@ static bool mspParameterGroupsCommand(sbuf_t *dst, sbuf_t *src) #ifdef USE_SIMULATOR bool isOSDTypeSupportedBySimulator(void) { +#ifdef USE_OSD displayPort_t *osdDisplayPort = osdGetDisplayPort(); return (osdDisplayPort && osdDisplayPort->cols == 30 && (osdDisplayPort->rows == 13 || osdDisplayPort->rows == 16)); +#else + return false; +#endif } void mspWriteSimulatorOSD(sbuf_t *dst) diff --git a/src/main/io/displayport_msp_bf_compat.c b/src/main/io/displayport_msp_bf_compat.c index 792ab800dd..0ea4855920 100644 --- a/src/main/io/displayport_msp_bf_compat.c +++ b/src/main/io/displayport_msp_bf_compat.c @@ -17,7 +17,7 @@ #include "platform.h" -#ifdef USE_MSP_DISPLAYPORT +#if defined(USE_OSD) && defined(USE_MSP_DISPLAYPORT) #ifndef DISABLE_MSP_BF_COMPAT diff --git a/src/main/io/displayport_msp_bf_compat.h b/src/main/io/displayport_msp_bf_compat.h index 4bfe84dc0f..062057297d 100644 --- a/src/main/io/displayport_msp_bf_compat.h +++ b/src/main/io/displayport_msp_bf_compat.h @@ -22,7 +22,7 @@ #include "platform.h" -#if defined(USE_MSP_DISPLAYPORT) && !defined(DISABLE_MSP_BF_COMPAT) +#if defined(USE_OSD) && defined(USE_MSP_DISPLAYPORT) && !defined(DISABLE_MSP_BF_COMPAT) #include "osd.h" uint8_t getBfCharacter(uint8_t ch, uint8_t page); #define isBfCompatibleVideoSystem(osdConfigPtr) (osdConfigPtr->video_system == VIDEO_SYSTEM_BFCOMPAT) diff --git a/src/main/rx/crsf.c b/src/main/rx/crsf.c index d8182533df..fb2f7ec386 100755 --- a/src/main/rx/crsf.c +++ b/src/main/rx/crsf.c @@ -242,6 +242,7 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeConfig_t *rxRuntimeConfig) rxLinkStatistics.uplinkTXPower = crsfTxPowerStatesmW[crsftxpowerindex]; rxLinkStatistics.activeAntenna = linkStats->activeAntenna; +#ifdef USE_OSD if (rxLinkStatistics.uplinkLQ > 0) { int16_t uplinkStrength; // RSSI dBm converted to % uplinkStrength = constrain((100 * sq((osdConfig()->rssi_dbm_max - osdConfig()->rssi_dbm_min)) - (100 * sq((osdConfig()->rssi_dbm_max - rxLinkStatistics.uplinkRSSI)))) / sq((osdConfig()->rssi_dbm_max - osdConfig()->rssi_dbm_min)),0,100); @@ -250,10 +251,10 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeConfig_t *rxRuntimeConfig) else if (rxLinkStatistics.uplinkRSSI < osdConfig()->rssi_dbm_min) uplinkStrength = 0; lqTrackerSet(rxRuntimeConfig->lqTracker, scaleRange(uplinkStrength, 0, 99, 0, RSSI_MAX_VALUE)); - } - else + } else { lqTrackerSet(rxRuntimeConfig->lqTracker, 0); - + } +#endif // This is not RC channels frame, update channel value but don't indicate frame completion return RX_FRAME_PENDING; }