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

Add MAVLink telemetry option in LUA & Prevent Wide mode when relevant. #2497

Open
wants to merge 3 commits into
base: mavlink-rc
Choose a base branch
from

Conversation

nekwebdev
Copy link

MAVLink telemetry ratio option forces 1:2 and also forces Hybrid switch mode when using a packet rate that is not full res.

Note that I changed the tester default to be deleted from TLM_RATIO_1_2 to TLM_RATIO_MAVLINK.

* New TLM_RATIO_MAVLINK telemtry ratio.

* Displays like Std and Race in LUA with telemetry ratio in parenthesis.

* Gets replaced by TLM_RATIO_1_2 before it gets enumerated.

* Changed tester default from TLM_RATIO_1_2 to TLM_RATIO_MAVLINK.
* If not in a full res packet rate and with MAVLink tlm ratio set:

- Force Hybrid when changing the switch mode in LUA.

- Force Hybrid when changing to a packet rate that is not full res.

- Only display Hybrid as an option in LUA.
@nekwebdev
Copy link
Author

Ran a few tests.

As expected LUA will not change to MavLink tlm ratio when not using full res packet rate if connected.

I then tested the various switch modes.

Using MAVLink Protocol:

F1000 - MAVLink tlm - Hybrid - as expected
D500 - MAVLink tlm - Hybrid - as expected
500Hz - MAVLink tlm - Hybrid - as expected
333Hz Full Res - MAVLink tlm - 8ch,16ch,12ch all as expected

I then removed the hardcoded protocol in rx_main.cpp and tx_main.cpp and reverting to CRSF

CRSF Protocol:

F1000 - Std tlm - Hybrid - as expected
F1000 - Std tlm - Wide - as expected
D500 - Std tlm - Hybrid - as expected
D500 - Std tlm - Wide - as expected
500Hz - Std tlm - Hybrid - as expected
500Hz - Std tlm - Wide - as expected
333Hz Full Res - Std tlm - 8ch,16ch,12ch all as expected

* Moved the config loading in tx_main.cpp to happen before setupTarget().
Seems fine but could have bad consequences?
This allowed to use the MAVLink tlm ratio setting to toggle MAVLink mode
* Trying a reboot after tlm ratio change to/from MAVLink.
The goal is to reload the module so it can switch to MAVLink mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants