Skip to content

Commit

Permalink
Fix comparison/assignment error.
Browse files Browse the repository at this point in the history
Ignore unknown and unsupported VTXs
  • Loading branch information
geoffsim committed Dec 17, 2024
1 parent b7813df commit 275dbad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,8 +1055,8 @@ void parse_vtx_params(uint8_t isMSP_V2) {
return;
}

// Check for unknown VTX device (probably from a device that is not interested in controlling the VTX directly)
if (msp_rx_buf[0] = 0xff) {
// Ignore unknown/unsupported VTX devices
if (msp_rx_buf[0] == VTXDEV_UNKNOWN || msp_rx_buf[0] == VTXDEV_UNSUPPORTED) {
return;
}

Expand Down
10 changes: 10 additions & 0 deletions src/msp_displayport.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ typedef enum {
VTX_MENU_SAVE_EXIT,
} vtx_menu_state_e;

typedef enum {
VTXDEV_UNSUPPORTED = 0, // reserved for MSP
VTXDEV_RTC6705 = 1,
// 2 reserved
VTXDEV_SMARTAUDIO = 3,
VTXDEV_TRAMP = 4,
VTXDEV_MSP = 5,
VTXDEV_UNKNOWN = 0xFF,
} vtxDevType_e;

typedef enum {
DISPLAY_OSD,
DISPLAY_CMS,
Expand Down

0 comments on commit 275dbad

Please sign in to comment.