-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop MSP_VTX_CONFIG messages with an invalid VTX id #231
Conversation
src/msp_displayport.c
Outdated
@@ -1055,6 +1055,11 @@ 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assingment is intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Thanks, I’ll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have consts on plece :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better now 👌
i locally set the code to |
VTX Menu Slow, but Cam feed works fro EmuFlight: https://youtu.be/FvsPrMdEjyk (note slow OSD update and cursor somewhat erratic) |
Ignore unknown and unsupported VTXs
Tested on Whoop, Race V1, and Race V2. Also checked against iNav 8.0 and EmuFlight 0.4.3. |
@ligenxxxx , please merge. |
EmuFlight reported an issue with the latest VTX code.
For the VTX to communicate with an FC, an MSP_VTX_CONFIG handshake is done to sync the two devices.
If the FC is not interested in controlling the VTX band/channel/power, it still needs to send a response to the VTX when requested. This is achieved by sending an MSP_VTX_CONFIG message with an invalid VTX ID (6 is MSP).
This change detects this invalid message Id and throws the message away.