Skip to content
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

[WIP] VTX-MSP support #136

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

jesuslg123
Copy link

@jesuslg123 jesuslg123 commented Sep 17, 2023

Support for VTX MSP

Implement VTX MSP protocol support so the video channel can be changed from Betaflight, ELRS Lua Script or any other system that supports VTX MPS protocol.

The plan is be able to change algo power and bandwidth in the future.

Setup

  1. Update the MSP-OSD package in both ends, Caddx vista/air unit and goggles V1/V2.
  2. Load a VTX table data on Betaflight (this will happen automatically when develop is completed)
  3. The feature is disabled by default, in order to enable it open the MSP-OSD package settings on the WTF OS configurator.

The flow

image

  1. VTX startup up
  2. VTX setup the Betaflight VTX table and mark it as READY
  3. VTX request every 200ms the VTX-MSP data
  4. VTX read the channel from the MSP message
  5. VTX send the data to the goggles via UDP protocol.
  6. Goggles get the message
  7. Goggles update the channel sent from the VTX

Technical details

The VTX-MSP data, including the channel is being pulled every 200ms in a loop. The channel data is added to a data frame sent to the goggles pretty frequently.

Once the data is on the goggles we check if the channel is different to the one from the previous message.

The FC will only send VTX message when the VTX has been marked as READY.

What does it mean ready?

  • It has VTX table

TODO

  1. Sync channel changes from googles to BF. This probably is better to be handled on the VTX side. There is no other system doing this now. Probably it won't be done now.
  2. Automatically set a valid VTX table data on BF.
  3. Enable power change (need to find a method)
  4. Enable bitrate mode change (need to find a method)

Known issues

  1. If channel is changed from the goggles, the sync with the MSP-VTX is lost. Right now this channel change is not being controlled.
  2. You can setup any channel, even if is not supported, it will simply not do the channel change. This happen for index channels bigger than 8 in 25mbits or 3 in 50mbits.

@jesuslg123 jesuslg123 force-pushed the VTX-managment branch 2 times, most recently from aacd60a to 74865e3 Compare September 21, 2023 22:22
jni/msp_displayport_mux.c Outdated Show resolved Hide resolved
@jesuslg123 jesuslg123 changed the title Documenting some research [WIP] VTX-MSP support Sep 22, 2023
@jesuslg123 jesuslg123 force-pushed the VTX-managment branch 7 times, most recently from 5158e10 to a7b2fc1 Compare September 24, 2023 16:51
jni/util/vtx_manager.h Outdated Show resolved Hide resolved
jni/util/vtx_manager.c Outdated Show resolved Hide resolved
jni/util/vtx_manager.c Outdated Show resolved Hide resolved
@jesuslg123 jesuslg123 force-pushed the VTX-managment branch 5 times, most recently from bb1ea95 to 3eb7137 Compare October 1, 2023 09:26
Implement VTX MSP protocol support so the video channel can be changed
from Betaflight, ELRS Lua Script or any other system that uses VTX MPS
protocol.

The plan is be able to change algo power and badnwidth.
Need to refactor the .h - testing for now
Also some minor warnings corrections
Based on @mmosca PR changes I have also enable latest NDK
support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants