Skip to content

Commit

Permalink
Add AUTOHD option
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Nov 14, 2024
1 parent f100947 commit fbc33e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/drivers/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ typedef enum {
VIDEO_SYSTEM_DJIWTF,
VIDEO_SYSTEM_AVATAR,
VIDEO_SYSTEM_DJICOMPAT,
VIDEO_SYSTEM_DJICOMPAT_HD
VIDEO_SYSTEM_DJICOMPAT_HD,
VIDEO_SYSTEM_AUTOHD
} videoSystem_e;

typedef enum {
Expand Down
4 changes: 1 addition & 3 deletions src/main/fc/fc_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
#ifdef USE_MSP_DISPLAYPORT
case MSP_SET_OSD_CANVAS:
{
if (osdConfig()->video_system == VIDEO_SYSTEM_AUTO) {
if (osdConfig()->video_system == VIDEO_SYSTEM_AUTOHD) {
displayPort_t *dp = osdGetDisplayPort();
if (dp != NULL && dataSize == 2) {
dp->cols = constrain(sbufReadU8(src), 30, MSP_DISPLAYPORT_MAX_COLS);
Expand All @@ -2073,8 +2073,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
break;
#endif



case MSP2_INAV_SET_MISC:
if (dataSize == 41) {
sbufReadU16(src); // midrc
Expand Down
2 changes: 1 addition & 1 deletion src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ tables:
values: ["MAH", "WH"]
enum: osd_stats_energy_unit_e
- name: osd_video_system
values: ["AUTO", "PAL", "NTSC", "HDZERO", "DJIWTF", "AVATAR", "BF43COMPAT", "BFHDCOMPAT"]
values: ["AUTO", "PAL", "NTSC", "HDZERO", "DJIWTF", "AVATAR", "BF43COMPAT", "BFHDCOMPAT", "AUTOHD"]
enum: videoSystem_e
- name: osd_telemetry
values: ["OFF", "ON","TEST"]
Expand Down
3 changes: 2 additions & 1 deletion src/main/io/displayport_msp_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ displayPort_t* mspOsdDisplayPortInit(const videoSystem_e videoSystem)
{
if (mspOsdSerialInit()) {
switch(videoSystem) {
case VIDEO_SYSTEM_AUTO:
case VIDEO_SYSTEM_DJICOMPAT:
case VIDEO_SYSTEM_PAL:
currentOsdMode = SD_3016;
Expand All @@ -460,7 +461,7 @@ displayPort_t* mspOsdDisplayPortInit(const videoSystem_e videoSystem)
screenRows = HDZERO_ROWS;
screenCols = HDZERO_COLS;
break;
case VIDEO_SYSTEM_AUTO:
case VIDEO_SYSTEM_AUTOHD:
case VIDEO_SYSTEM_DJIWTF:
currentOsdMode = HD_6022;
screenRows = DJI_ROWS;
Expand Down

0 comments on commit fbc33e0

Please sign in to comment.