iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.09k stars 1.46k forks source link

1.3GHz (1G3) VTX Control via Tramp Protocol #7469

Closed Aerial812 closed 2 years ago

Aerial812 commented 3 years ago

Current Behavior

iNav is setup for easy UART control of 5.8GHz video transmitters via IRC Tramp, but does not appear to allow control of 1.3Ghz VTX.

Desired Behavior

Allow users to control the power settings of a 1.3GHz video transmitter, specifically the Matek VTX-1G3SE, in a similar way that you can for 5.8GHz video transmitters.

Suggested Solution

Currently the documentation on the Matex VTX provides details on how to set this up in betaflight. Those details are pasted below and available with more documentation at the link in the bottom of this request.

vtxtable bands 2 vtxtable channels 8 vtxtable band 1 1G3_A A 1080 1120 1160 1200 1240 1280 1320 1360 vtxtable band 2 1G3_B B 1080 1120 1160 1200 1258 1280 1320 1360 vtxtable powerlevels 3 vtxtable powervalues 25 200 800 vtxtable powerlabels 25 200 800

NOTE: only 1258 and 1280 can be enabled via CMS control on 2CH version.

Who does this impact? Who is this for?

This impacts all users who want to be able to use 1.3GHz video transmitters and have the ability to turn the power up and down. It is currently a blocker to be able to use the leading hardware available for long-range FPV.

Additional context

The Matek VTX provides additional documentation on what is needed to support it. Matek VTX-1G3SE: http://www.mateksys.com/?portfolio=vtx-1g3se#tab-id-2

wx4cb commented 2 years ago

inav doesn't use vtx tables. also, IRC tramp support has been a part of inav for ages, so should work.

MrD-RC commented 2 years ago

I did have a look at the code, and there does appear to be 5.8 specific stuff there, and the power levels would need changing too. I don't have a 1G3SE to test with, so haven't touched it.

MrD-RC commented 2 years ago

I've made a start on the code and have ordered a 1G3SE. So hopefully I can test in a few weeks.

jeffhendrix commented 2 years ago

MrD-RC, what's the latest status on this? I just ordered the matek vtx and I'm interested in this project. I was going to start working on it, but it sounds like you might have something close to working.

MrD-RC commented 2 years ago

The code is done, I just need to test. I’ve been pretty busy recently, so not had the chance.

jeffhendrix commented 2 years ago

If I get my vtx soon (it's on the Banggood slow boat), I'll test your code and post the results.

jeffhendrix commented 2 years ago

MrD, got my VTX today. I'll try and wire things up and give it a try

jeffhendrix commented 2 years ago

@MrD-RC , I just tested your code an it is working great. I used a Matek VTX-1G3SE 9CH VTX. Checked both bands and VTX properly changes channels (verified with LEDs on the board as well as transmitted video using RMRC VRX). Also verified the power changes (with the onboard LEDs only). The only thing I couldn't get it to do was go into pit mode, but maybe there was something else I didn't have set right. Not being able to go into pit mode probably not a big deal for a plane (I would never use it). I think you are ready to move forward with PR

MrD-RC commented 2 years ago

Thanks @jeffhendrix I’m away with work. But as soon as I get the chance, I’ll make the PR.

MrD-RC commented 2 years ago

Work has been an absolute nightmare at the moment. As this won’t be a 4.0 thing anyway. I’ll check out the pitmode thing before the PR. I don’t know anyone who has used pitmode with fixed wing. But, it should work if the spec is there.

Aerial812 commented 2 years ago

@MrD-RC & @jeffhendrix — Just curious if any progress has been made here. It sounds like the code is done, but maybe more testing is needed?

Fatih-Birkan commented 2 years ago

@MrD-RC Can i test the code if possible ? I started using these vtx's with INAV and controlling them from INAV would be great. Thanks.

Jetrell commented 2 years ago

@Aerial812 @jeffhendrix @rts18 @Fatih-Birkan @kealper @Orvo300 Would you people be so kind to leave a LIKE for Darrens work on this feature, under the Pull Request link (above).. So its known to the head dev, that its a well requested feature.

nick9one1 commented 2 years ago

@MrD-RC thanks for your work on this!

Is pit mode available in the power settings? set vtx power level 1-3 work as expected, but 0 doesn't enable pit.

MrD-RC commented 2 years ago

No pitmode. Figuring out why that didn't work would need diving deeper in to Tramp than I understand at the moment. It should just be in the Tramp code that already exists.

The general consensus was, who uses pitmode on 1.3GHz anyway. Most of the 1.3 VTx out there don't even have the option to change power.