VTX table irrational behavior

I have a VTX(IRCTramp) with a custom value for the VTX table.
Label: 2000
Value: 100
AP_VideoTX.cpp:

{ 1, 100, 2000, 0xFF, PowerActive::Active }, // in SA 2.1 only.


But when I try to integrate these values into the table, I get the following behavior:
Changing VTX_POWER to 2000mv doesn’t work, but when I set VTX_POWER to 100, my VTX changes the power to 2000mw.
Maybe i made a mistake?

Can you tell me which VTX this is?

I am using Foxeer Reaper Inlfinity 5w
This is a requirement from:

Foxeer 5.8G Reaper Infinity 5W 40CH VTx
“powerlevels_list”: [
{
“value”: 25,
“label”: "50 "
},
{
“value”: 100,
“label”: “500”
},
{
“value”: 200,
“label”: "1W "
},
{
“value”: 400,
“label”: “2.5”
},
{
“value”: 600,
“label”: "5W "
}
]

When I integrate these values into VTX Table:

AP_VideoTX.cpp
AP_VideoTX::PowerLevel AP_VideoTX::_power_levels[VTX_MAX_POWER_LEVELS] = {
// level, mw, dbm, dac
{ 0xFF, 0, 0, 0 }, // only in SA 2.1
{ 0, 50, 25, 0xFF},// Foxeer infinity-5W 50mw
{ 1, 500, 100, 0xFF},// Foxeer infinity-5W 500mw
{ 2, 1000, 200, 0xFF},// Foxeer infinity-5W 1000mw
{ 3, 2500, 400, 0xFF},// Foxeer infinity-5W 2500mw
{ 4, 5000, 600, 0xFF},// Foxeer infinity-5W 5000mw
{ 0xFF, 0, 0, 0XFF, PowerActive::Inactive } // slot reserved for a custom power level
};

These values then go into:

AP_Tramp.cpp

void AP_Tramp::process_requests()

send_command(‘P’, vtx.get_configured_power_mw());

But why we create VTX Table if we send to VTX only mw?

I change this to:

AP_Tramp.cpp

void AP_Tramp::process_requests()

send_command(‘P’, vtx.get_configured_power_dbm());

And in my current case with this VTX, this solution gives the ability to switch power.

I want to ask, is it only related to this VTX (with the implementation of the protocol)?

Thank you for your time!
Best Regards
sh1noda

That seems a bit odd, Tramp is different to earlier versions of SmartAudio in that it advertises the powers it supports - it should “just work”. I’m not clear why it does not.

Where I can find IRCTramp specification?
Maybe there I’ll find some answers :ninja:

I don’t know, the code comes from betaflight

Then I’ll do my own investigation :ninja:

In my opinion, this problem is due to the fact that the IRCTramp implementation in Ardupilot was designed for power_value and power_label to be equal.
But I have looked at several tables for different transmitters and these values are always different.
So when we send the values:

send_command(‘P’, vtx.get_configured_power_mw());

And i think, this is mistake…
Because we should be sending:

send_command(‘P’, vtx.get_configured_power_dbm());
In this example power_value is stored in the field .dbm

What do you think about that? :ninja: