mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
FIX: MSP Displayport now has dependency on OSD config (#12106)
* FIX: MSP Displayport now has dependency on OSD config See: Center logo and CMS display for HD OSD (#12056) * CMS is dependent on OSD * Update src/main/io/displayport_msp.c Co-authored-by: Jan Post <Rm2k-Freak@web.de> * A few extra comments (to aid in #endif reconciliation)
This commit is contained in:
parent
f7b5df0ee8
commit
dbc647d464
2 changed files with 25 additions and 16 deletions
|
@ -165,6 +165,7 @@ static bool isSynced(const displayPort_t *displayPort)
|
||||||
|
|
||||||
static void redraw(displayPort_t *displayPort)
|
static void redraw(displayPort_t *displayPort)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_OSD
|
||||||
if (vcdProfile()->video_system == VIDEO_SYSTEM_HD) {
|
if (vcdProfile()->video_system == VIDEO_SYSTEM_HD) {
|
||||||
displayPort->rows = osdConfig()->canvas_rows;
|
displayPort->rows = osdConfig()->canvas_rows;
|
||||||
displayPort->cols = osdConfig()->canvas_cols;
|
displayPort->cols = osdConfig()->canvas_cols;
|
||||||
|
@ -173,6 +174,11 @@ static void redraw(displayPort_t *displayPort)
|
||||||
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
|
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
|
||||||
displayPort->cols = 30 + displayPortProfileMsp()->colAdjust;
|
displayPort->cols = 30 + displayPortProfileMsp()->colAdjust;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
const uint8_t displayRows = (vcdProfile()->video_system == VIDEO_SYSTEM_PAL) ? 16 : 13;
|
||||||
|
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
|
||||||
|
displayPort->cols = 30 + displayPortProfileMsp()->colAdjust;
|
||||||
|
#endif // USE_OSD
|
||||||
drawScreen(displayPort);
|
drawScreen(displayPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -350,11 +350,11 @@ extern uint8_t _dmaram_end__;
|
||||||
#endif // !defined(CLOUD_BUILD)
|
#endif // !defined(CLOUD_BUILD)
|
||||||
|
|
||||||
#ifndef LED_MAX_STRIP_LENGTH
|
#ifndef LED_MAX_STRIP_LENGTH
|
||||||
#ifdef USE_LEDSTRIP_64
|
#ifdef USE_LEDSTRIP_64
|
||||||
#define LED_MAX_STRIP_LENGTH 64
|
#define LED_MAX_STRIP_LENGTH 64
|
||||||
#else
|
#else
|
||||||
#define LED_MAX_STRIP_LENGTH 32
|
#define LED_MAX_STRIP_LENGTH 32
|
||||||
#endif
|
#endif
|
||||||
#endif // #ifndef LED_MAX_STRIP_LENGTH
|
#endif // #ifndef LED_MAX_STRIP_LENGTH
|
||||||
|
|
||||||
#if defined(USE_SDCARD)
|
#if defined(USE_SDCARD)
|
||||||
|
@ -376,7 +376,7 @@ extern uint8_t _dmaram_end__;
|
||||||
#define USE_VTX_TRAMP
|
#define USE_VTX_TRAMP
|
||||||
#define USE_VTX_MSP
|
#define USE_VTX_MSP
|
||||||
#define USE_VTX_TABLE
|
#define USE_VTX_TABLE
|
||||||
#endif
|
#endif // USE_VTX
|
||||||
|
|
||||||
#define USE_HUFFMAN
|
#define USE_HUFFMAN
|
||||||
|
|
||||||
|
@ -396,10 +396,7 @@ extern uint8_t _dmaram_end__;
|
||||||
#define USE_DSHOT_DMAR
|
#define USE_DSHOT_DMAR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_CMS
|
|
||||||
#define USE_MSP_DISPLAYPORT
|
|
||||||
#define USE_MSP_OVER_TELEMETRY
|
#define USE_MSP_OVER_TELEMETRY
|
||||||
#define USE_OSD_OVER_MSP_DISPLAYPORT
|
|
||||||
|
|
||||||
#define USE_VIRTUAL_CURRENT_METER
|
#define USE_VIRTUAL_CURRENT_METER
|
||||||
#define USE_CAMERA_CONTROL
|
#define USE_CAMERA_CONTROL
|
||||||
|
@ -429,7 +426,7 @@ extern uint8_t _dmaram_end__;
|
||||||
#define USE_SPEKTRUM_VTX_CONTROL
|
#define USE_SPEKTRUM_VTX_CONTROL
|
||||||
#define USE_SPEKTRUM_VTX_TELEMETRY
|
#define USE_SPEKTRUM_VTX_TELEMETRY
|
||||||
#define USE_SPEKTRUM_CMS_TELEMETRY
|
#define USE_SPEKTRUM_CMS_TELEMETRY
|
||||||
#endif
|
#endif // USE_SERIALRX_SPEKTRUM
|
||||||
|
|
||||||
#define USE_BOARD_INFO
|
#define USE_BOARD_INFO
|
||||||
#define USE_EXTENDED_CMS_MENUS
|
#define USE_EXTENDED_CMS_MENUS
|
||||||
|
@ -472,17 +469,23 @@ extern uint8_t _dmaram_end__;
|
||||||
#define USE_GPS_NMEA
|
#define USE_GPS_NMEA
|
||||||
#define USE_GPS_UBLOX
|
#define USE_GPS_UBLOX
|
||||||
#define USE_GPS_RESCUE
|
#define USE_GPS_RESCUE
|
||||||
|
#endif // USE_GPS
|
||||||
|
|
||||||
|
#if defined(USE_OSD) || defined(USE_OSD_HD) || defined(USE_OSD_SD)
|
||||||
|
|
||||||
|
#ifndef USE_OSD
|
||||||
|
#define USE_OSD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_OSD
|
#define USE_CMS
|
||||||
|
#define USE_MSP_DISPLAYPORT
|
||||||
#define USE_OSD_OVER_MSP_DISPLAYPORT
|
#define USE_OSD_OVER_MSP_DISPLAYPORT
|
||||||
#define USE_OSD_ADJUSTMENTS
|
#define USE_OSD_ADJUSTMENTS
|
||||||
#define USE_OSD_PROFILES
|
#define USE_OSD_PROFILES
|
||||||
#define USE_OSD_STICK_OVERLAY
|
#define USE_OSD_STICK_OVERLAY
|
||||||
#endif
|
#endif // defined(USE_OSD) || defined(USE_OSD_HD) || defined(USE_OSD_SD)
|
||||||
|
|
||||||
#if defined(CLOUD_BUILD)
|
#if defined(CLOUD_BUILD)
|
||||||
|
|
||||||
// Handle the CRSF co-dependency requirements
|
// Handle the CRSF co-dependency requirements
|
||||||
#if defined(USE_TELEMETRY_CRSF)
|
#if defined(USE_TELEMETRY_CRSF)
|
||||||
|
|
||||||
|
@ -490,8 +493,8 @@ extern uint8_t _dmaram_end__;
|
||||||
#if defined(USE_CMS)
|
#if defined(USE_CMS)
|
||||||
#define USE_CRSF_CMS_TELEMETRY
|
#define USE_CRSF_CMS_TELEMETRY
|
||||||
#define USE_CRSF_LINK_STATISTICS
|
#define USE_CRSF_LINK_STATISTICS
|
||||||
#endif
|
#endif // USE_CMS
|
||||||
|
|
||||||
#endif // CRSF co-dependency requirements.
|
#endif // USE_TELEMETRY_CRSF (CRSF co-dependency requirements).
|
||||||
|
|
||||||
#endif
|
#endif // CLOUD_BUILD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue