1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Merge pull request #10485 from etracer65/msp_displayport_video_system

Make MSP displayPort respect the NTSC/PAL setting
This commit is contained in:
Michael Keller 2021-02-08 16:14:39 +13:00 committed by GitHub
commit 1aa3d943e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1516,7 +1516,7 @@ const clivalue_t valueTable[] = {
#endif
// PG_VCD_CONFIG
#if defined(USE_MAX7456) || defined(USE_FRSKYOSD)
#if defined(USE_MAX7456) || defined(USE_FRSKYOSD) || defined(USE_MSP_DISPLAYPORT)
{ "vcd_video_system", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_VIDEO_SYSTEM }, PG_VCD_CONFIG, offsetof(vcdProfile_t, video_system) },
#endif
#if defined(USE_MAX7456)

View file

@ -32,6 +32,7 @@
#include "common/utils.h"
#include "drivers/display.h"
#include "drivers/osd.h"
#include "io/displayport_msp.h"
@ -39,6 +40,8 @@
#include "msp/msp_protocol.h"
#include "msp/msp_serial.h"
#include "pg/vcd.h"
static displayPort_t mspDisplayPort;
static int output(displayPort_t *displayPort, uint8_t cmd, uint8_t *buf, int len)
@ -141,7 +144,8 @@ static bool isSynced(const displayPort_t *displayPort)
static void redraw(displayPort_t *displayPort)
{
displayPort->rows = 13 + displayPortProfileMsp()->rowAdjust; // XXX Will reflect NTSC/PAL in the future
const uint8_t displayRows = (vcdProfile()->video_system == VIDEO_SYSTEM_PAL) ? 16 : 13;
displayPort->rows = displayRows + displayPortProfileMsp()->rowAdjust;
displayPort->cols = 30 + displayPortProfileMsp()->colAdjust;
drawScreen(displayPort);
}