iNavFlight / inav

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

HDZero freestyle vtx should have 4 power level options when "unlocked" #10238

Open arkarkark opened 2 months ago

arkarkark commented 2 months ago

Current Behavior

when configuring a HDZero vtx over msp there are only three power level choices 1,2,3 according to the documents most HDZero vtx have two power levels and the freestyle has 4 options if you have a ham license and have unlocked the firmware (page 23 in that manual linked earlier).

967e02_10b30e97075b4244b4e2539645f9b954_pdf

Steps to Reproduce

  1. configure a MSP Displayport peripheral on the ports page
  2. go to configure page and try and configure VTX power level to 4 (for 1 Watt)
INAV_Configurator

4. 5.

Expected behavior

I should be able to select levels 1, 2,3 or 4. ideally it should talk to the VTX and find out what power levels are available.

I feel like I've seen a video of someone (bardwell?) seeing 2 power levels and then unlocking the higher power levels and then they see 4 options in their flight controller software. might have been betaflight. that would be ideal.

Suggested solution(s)

quickest fix would be to update the configuration page to allow you to select a valid power level up to the value of VTX_SETTINGS_MAX_POWER.

Ideal would be talk to the vtx and see what power levels are available? maybe remember the last time you talked to the vtx in case it is not powered up when configuring iNav.

Additional context

I looked in the cli and it turns out I can set it to 4 (and even 5!) in the cli

# get vtx_power 
vtx_power = 3
Allowed range: 1 - 5

# set vtx_power = 4
vtx_power set to 4
# get vtx_power
vtx_power = 4
Allowed range: 1 - 5

but when you do so the configuration page shows a value of 1. however clicking save on that page doesn't seem to reset it to one so that's good.


# INAV/SPEEDYBEEF405WING 7.1.2 Jun  1 2024 / 00:47:23 (4e1e59eb)
# GCC-10.3.1 20210824 (release)
geoffsim commented 1 month ago

HDZERO sends the number of power levels the VTX can support on its initial config MSP message to the FC. It could be used to set the max power levels in the FC. The configurator would have to refresh to read this max value from the FC if already connected to the FC before the VTX powered up.

Personally, I would not want to set power level 4 from the start. I set the default power to 1 or 2 in the configuration and increase it to 3 or 4 once in the air by a switch configured in the programming tab.