From 040a519ecdd4ce06f70da3785a2af2e2805d6d9f Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 13 Jan 2023 22:05:43 +0000 Subject: [PATCH] Automatically apply HD settings if HD VTX is detected (#12184) --- src/main/msp/msp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index cb048b6c8..7662e98a3 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -4217,8 +4217,17 @@ static mspResult_e mspCommonProcessInCommand(mspDescriptor_t srcDesc, int16_t cm osdConfigMutable()->canvas_cols = sbufReadU8(src); osdConfigMutable()->canvas_rows = sbufReadU8(src); - // An HD VTX has communicated it's canvas size, so we must be in HD mode - vcdProfileMutable()->video_system = VIDEO_SYSTEM_HD; + if ((vcdProfile()->video_system != VIDEO_SYSTEM_HD) || + (osdConfig()->displayPortDevice != OSD_DISPLAYPORT_DEVICE_MSP)) { + // An HD VTX has communicated it's canvas size, so we must be in HD mode + vcdProfileMutable()->video_system = VIDEO_SYSTEM_HD; + // And using MSP displayport + osdConfigMutable()->displayPortDevice = OSD_DISPLAYPORT_DEVICE_MSP; + + // Save settings and reboot or the user won't see the effect and will have to manually save + writeEEPROM(); + systemReset(); + } } break; #endif //USE_OSD_HD -- 2.11.4.GIT