iNavFlight / inav

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

MSP VTX Code Updates #10355

Closed geoffsim closed 1 week ago

geoffsim commented 2 months ago

Current VTX Control from ELRS and FC is erratic.

The MSP VTX code, originally pulled from BF, was not properly integrated into iNav. This led to the "stealing" of VTX messages meant for the original FC VTX processing. Also, the FC message processing was incorrectly calling MSP VTX code directly rather than allowing the existing VTX support framework to process any changes to band/channel/power.

MartinHugh commented 2 months ago

probably related to or causing https://github.com/hd-zero/hdzero-vtx/issues/203

geoffsim commented 2 months ago

VTX band/channel/power/pitmode/lpmode can be changed in the FC VTX menu; the actual VTX menu; the programming tab; and the ELRS VTX lua script. If you use more than one of these methods, you may find discrepancies between what you think you have set and and what is actually set. For example, using a switch to set a power level of 1 can be overriden by a VTX menu or the ELRS lua. Only use one of these methods to get consistent results. Also, pit mode is not very well supported in iNav, and you may find issues when using it.

geoffsim commented 1 month ago

Caveats:

  1. Both PIT mode and LP Mode do not always work as expected on HDZERO. This will be addressed in a later PR.
  2. When using the programming tab to change band/channel/power (ex, using TX switches), using the OSD VTX menu will override these settings and will not show in the OSD menu. This will/may be addressed in a later PR.
  3. Setting a power level of 0 in the programming tab will result in the VTX power level to be set to 0mW, regardless of the arming mode.