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

Increase SMARTAUDIO_MAX_POWER_COUNT to 8 #10261

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

bkleiner
Copy link
Collaborator

Some SA 2.1 devices like TBS UNIFY PRO32 DP support up to 8 powerlevels being reported by GetSettings request.
This PR increases the current limit of 5 to 8.

@sensei-hacker
Copy link
Collaborator

sensei-hacker commented Jul 30, 2024

I wonder if I'm misreading the product page and manual for that VTX.
The product page lists these power levels selectable by SmartAudio:

14dBm (25mW)
20dBm (100mW)
26dBm (400mW)
33dBm+ (2000mW+)

The manual seems to indicate you can select power levels 2 1/2, 3 1/2 etc via the physical buttons, but not via SmartAudio.

Is this mistaken? Have you selected the in-between power levels with this code and seen the LEDs reflect the in-between power levels? (The SmartAudio protocol says if you ask for a power level not supported.by SmartAudio, it uses the next lower supported one.)

I don't see an 8-level Betaflight VTX table from TBS, do you?

If you've tested it and seen the indicator go through all 8 levels via SmartAudio that would be cool. I just don't see that in the manual or on the product page, so it would be a cool surprise.

@sensei-hacker
Copy link
Collaborator

Screenshot_20240730-003019

@bkleiner
Copy link
Collaborator Author

bkleiner commented Jul 30, 2024

I wonder if I'm misreading the product page and manual for that VTX. The product page lists these power levels selectable by SmartAudio:

14dBm (25mW) 20dBm (100mW) 26dBm (400mW) 33dBm+ (2000mW+)

That's there for simplicity's sake, but as SA 2.1 supports setting levels by dbm, there are infinite possible levels really.

That's consistent with the TBS SmartAudio protocol, which they have defined. (Plus pit mode, which is not a power level.)

The manual seems to indicate you can select power levels 2 1/2, 3 1/2 etc via the physical buttons, but not via SmartAudio.

Maybe i am being blind, but i don't see that the SA spec indicates any upper limit for the number of power levels returned by the 2.1 GetSettings frame. Maybe we should add one tho.

Is this mistaken? Have you selected the in-between power levels with this code and seen the LEDs reflect the in-between power levels? (The SmartAudio protocol says if you ask for a power level not supported.by SmartAudio, it uses the next lower supported one.)

Again, with 2.1 the power can be specified via dbm, which is also what iNav uses in that case, where there is really no such thing as a "valid power level" only "too much power".

I don't see an 8-level Betaflight VTX table from TBS, do you?

If you've tested it and seen the indicator go through all 8 levels via SmartAudio that would be cool. I just don't see that in the manual or on the product page.

I don't think we have published a 8-level vtx table, but then that's a bit of different situation, as there the user can easily modify the levels to their liking. Those are more of a "suggestion" than a "exhaustive list".
We have just confirmed that the DP does indeed return 8 levels.

EDIT: 8 is the max number of powerleves betaflight supports for a vtx table. thats how the number was chosen here.

@sensei-hacker
Copy link
Collaborator

sensei-hacker commented Jul 30, 2024

Thanks for the additional information!

I see you referred to TBS as "we" here and I saw your Discord message, so that's also informative. It makes sense you would have more information than I found. :)

@sensei-hacker sensei-hacker merged commit d2f15ee into iNavFlight:master Jul 30, 2024
22 checks passed
@bkleiner bkleiner deleted the increase-sa-level-max branch July 31, 2024 07:26
@ABLomas
Copy link

ABLomas commented Aug 14, 2024

I tested F405TE target (Matek F405 WMN) with TBS UNIFY PRO32 DP. No issues noticed, even PIT mode is selectable (which is a problem on many VTX'es).

@anti-vaxxer
Copy link

I tested F405TE target (Matek F405 WMN) with TBS UNIFY PRO32 DP. No issues noticed, even PIT mode is selectable (which is a problem on many VTX'es).

@ABLomas How did you manage to use Pitmode? I thought Pit mode hasn't yet been successfully implemented in INAV.

@ABLomas
Copy link

ABLomas commented Sep 2, 2024

@ABLomas How did you manage to use Pitmode? I thought Pit mode hasn't yet been successfully implemented in INAV.

Selecting via OSD menu "PIT ON" works.

@anti-vaxxer
Copy link

Selecting via OSD menu "PIT ON" works.

@ABLomas Thanks for the information. Apparently it works for Smartaudio then.

I have tried two different VTX that use IRC Tramp and Pit mode doesn't work.
Do you know how to fix it in INAV? Because I don't know anything about coding.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Sep 26, 2024

@bkleiner Can you please look at the Configurator side as well? A user on FB just tried it and it works through CLI to have all 8 power levels but in Configurator he only can select 1-5.

@bkleiner
Copy link
Collaborator Author

@bkleiner Can you please look at the Configurator side as well? A user on FB just tried it and it works through CLI to have all 8 power levels but in Configurator he only can select 1-5.

on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants