hd-zero / hdzero-vtx

GNU General Public License v3.0
216 stars 43 forks source link

Allow MSP-VTX to work with INAV #141

Closed mmosca closed 1 year ago

mmosca commented 1 year ago

The current firmware prevents MSP-VTX messages from being parsed if init_tables_done = 0, but init_tables_done = 1 can only be set if InitVtxTable is called.

InitVtxTable is only called for BTFL or QUIC.

INAV does not have the concept of VTX tables, this PR allows INAV's MSP_SET_CONFIG messages to be processed.

The check for INAV when setting init_table_unsupported can potentially be dropped to prevent similar pull requests from being needed in the future.

If you would like to help test this pull request, you will need to flash a version of INAV 7.0.0 that includes https://github.com/iNavFlight/inav/pull/9166 and a VTX firmware that includes this pull request.

For instructions on how to download INAV firmware including that pull request, please refer to INAV's documentation.

Your INAV 6.x diff all should work with 7.0.0.

If you are already using MSP OSD with HD-Zero the only change you should make is disable Smart Audio configuration in INAV (and/or disconnect the SA cable) , you will only need MSP OSD.

This is what your port setting for MSP OSD should look like in the INAV Configurator:

image

Once you have both firmwares flashed and configured, you should be able to change channels and power levels using ELRS backpack, or the OSD Menus in INAV using only the MSP DisplayPort UART.

mmosca commented 1 year ago

Some formatting changes slipped in, but the main change is msp_displayport.c:317 and msp_displayport.c:969

ligenxxxx commented 1 year ago

@mmosca Can iNav msp vtx support low band? #145

mmosca commented 1 year ago

@mmosca Can iNav msp vtx support low band? #145

I have mostly tested raceband. L band is not listed in the configurator, so there may be some work to be done there.

image

On the other hand, the only check we make is if the encoded channel and band received over msp is <= 0x3F.

MrMap commented 1 year ago

Trying to get a grip on current status. I use INAV 6.1.1 with HDZero Freestyle on latest VTX and goggle released firmware (HDZ_Rev_22082023). Currently using Smart Audio with unsatisfying results. Would really like to get up and going with MSP-VTX .

Question: Is the newly released HDZ Freestyle VTX FW updated to listen for INAV MSP_VTX? If not, when could we expect this to be implemented? If implemented now, do I need to do anything special to activate this functionality - have it working?

As I understand it as per today I will also need a INAV 7 build on the FC side (SpeedyBee F405 Wing). How to obtain this is an other challenge, but for me to consult the Inav community about. Tnx.

Edit: Running Edge TX 2.8.4 with latest ELRS. VTX backpack LUA works fine with HDZ goggles but unreliable with INAV/ VTX.

MartinHugh commented 1 year ago

Trying to get a grip on current status. I use INAV 6.1.1 with HDZero Freestyle on latest VTX and goggle released firmware (HDZ_Rev_22082023). Currently using Smart Audio with unsatisfying results. Would really like to get up and going with MSP-VTX .

Question: Is the newly released HDZ Freestyle VTX FW updated to listen for INAV MSP_VTX? If not, when could we expect this to be implemented? If implemented now, do I need to do anything special to activate this functionality - have it working?

As I understand it as per today I will also need a INAV 7 build on the FC side (SpeedyBee F405 Wing). How to obtain this is an other challenge, but for me to consult the Inav community about. Tnx.

Edit: Running Edge TX 2.8.4 with latest ELRS. VTX backpack LUA works fine with HDZ goggles but unreliable with INAV/ VTX.

v1.4.0 New Features:

Low band & 540p60 https://github.com/hd-zero/hdzero-vtx/pull/145 @ligenxxxx INAV MSP-VTX https://github.com/hd-zero/hdzero-vtx/pull/141 @mmosca Bug fixes:

Fix camera menu bug https://github.com/hd-zero/hdzero-vtx/pull/149 @ligenxxxx

https://github.com/hd-zero/hdzero-vtx/releases/tag/v1.4.0

mmosca commented 1 year ago

Trying to get a grip on current status. I use INAV 6.1.1 with HDZero Freestyle on latest VTX and goggle released firmware (HDZ_Rev_22082023). Currently using Smart Audio with unsatisfying results. Would really like to get up and going with MSP-VTX .

Question: Is the newly released HDZ Freestyle VTX FW updated to listen for INAV MSP_VTX? If not, when could we expect this to be implemented? If implemented now, do I need to do anything special to activate this functionality - have it working?

As I understand it as per today I will also need a INAV 7 build on the FC side (SpeedyBee F405 Wing). How to obtain this is an other challenge, but for me to consult the Inav community about. Tnx.

Edit: Running Edge TX 2.8.4 with latest ELRS. VTX backpack LUA works fine with HDZ goggles but unreliable with INAV/ VTX.

INAV MSP VTX also needs INAV 7.0.

MrMap commented 1 year ago

Trying to get a grip on current status. I use INAV 6.1.1 with HDZero Freestyle on latest VTX and goggle released firmware (HDZ_Rev_22082023). Currently using Smart Audio with unsatisfying results. Would really like to get up and going with MSP-VTX . Question: Is the newly released HDZ Freestyle VTX FW updated to listen for INAV MSP_VTX? If not, when could we expect this to be implemented? If implemented now, do I need to do anything special to activate this functionality - have it working? As I understand it as per today I will also need a INAV 7 build on the FC side (SpeedyBee F405 Wing). How to obtain this is an other challenge, but for me to consult the Inav community about. Tnx. Edit: Running Edge TX 2.8.4 with latest ELRS. VTX backpack LUA works fine with HDZ goggles but unreliable with INAV/ VTX.

INAV MSP VTX also needs INAV 7.0.

Yes, INAV 7. Unfortunately, despite wading through wiki and docs, I have not figured out exactly how to obtain an INAV 7 build for Speedy Bee F405 Wing target. Would you mind pointing me in the right direction, please? And thank you for bringing the MSP VTX to INAV! I am a github rookie, I know...

mmosca commented 1 year ago

You can find INAV build instructions here: https://github.com/iNavFlight/inav/tree/master/docs/development

You can also join the INAV discord for help: https://discord.gg/M5RGCqb2