mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Automatically apply HD settings if HD VTX is detected (#12184)
This commit is contained in:
parent
2417d50d89
commit
040a519ecd
1 changed files with 11 additions and 2 deletions
|
@ -4217,8 +4217,17 @@ static mspResult_e mspCommonProcessInCommand(mspDescriptor_t srcDesc, int16_t cm
|
||||||
osdConfigMutable()->canvas_cols = sbufReadU8(src);
|
osdConfigMutable()->canvas_cols = sbufReadU8(src);
|
||||||
osdConfigMutable()->canvas_rows = sbufReadU8(src);
|
osdConfigMutable()->canvas_rows = sbufReadU8(src);
|
||||||
|
|
||||||
// An HD VTX has communicated it's canvas size, so we must be in HD mode
|
if ((vcdProfile()->video_system != VIDEO_SYSTEM_HD) ||
|
||||||
vcdProfileMutable()->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;
|
break;
|
||||||
#endif //USE_OSD_HD
|
#endif //USE_OSD_HD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue