mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Add osd_canvas_width/height variables (#12164)
This commit is contained in:
parent
7dd0f60544
commit
1e3fcbfcee
7 changed files with 54 additions and 11 deletions
|
@ -165,14 +165,6 @@ static bool isSynced(const displayPort_t *displayPort)
|
|||
|
||||
static void redraw(displayPort_t *displayPort)
|
||||
{
|
||||
if (vcdProfile()->video_system == VIDEO_SYSTEM_HD) {
|
||||
displayPort->rows = osdConfig()->canvas_rows;
|
||||
displayPort->cols = osdConfig()->canvas_cols;
|
||||
} else {
|
||||
const uint8_t displayRows = (vcdProfile()->video_system == VIDEO_SYSTEM_PAL) ? VIDEO_LINES_PAL : VIDEO_LINES_NTSC;
|
||||
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
|
||||
displayPort->cols = OSD_SD_COLS + displayPortProfileMsp()->colAdjust;
|
||||
}
|
||||
drawScreen(displayPort);
|
||||
}
|
||||
|
||||
|
@ -220,7 +212,17 @@ displayPort_t *displayPortMspInit(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (vcdProfile()->video_system == VIDEO_SYSTEM_HD) {
|
||||
mspDisplayPort.rows = osdConfig()->canvas_rows;
|
||||
mspDisplayPort.cols = osdConfig()->canvas_cols;
|
||||
} else {
|
||||
const uint8_t displayRows = (vcdProfile()->video_system == VIDEO_SYSTEM_PAL) ? VIDEO_LINES_PAL : VIDEO_LINES_NTSC;
|
||||
mspDisplayPort.rows = displayRows + displayPortProfileMsp()->rowAdjust;
|
||||
mspDisplayPort.cols = OSD_SD_COLS + displayPortProfileMsp()->colAdjust;
|
||||
}
|
||||
|
||||
redraw(&mspDisplayPort);
|
||||
|
||||
return &mspDisplayPort;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue