1
0
Fork 0
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:
J Blackman 2022-12-29 15:19:03 +11:00 committed by GitHub
parent f7b5df0ee8
commit dbc647d464
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 16 deletions

View file

@ -165,6 +165,7 @@ static bool isSynced(const displayPort_t *displayPort)
static void redraw(displayPort_t *displayPort)
{
#ifdef USE_OSD
if (vcdProfile()->video_system == VIDEO_SYSTEM_HD) {
displayPort->rows = osdConfig()->canvas_rows;
displayPort->cols = osdConfig()->canvas_cols;
@ -173,6 +174,11 @@ static void redraw(displayPort_t *displayPort)
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
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);
}