Skip to content

Commit

Permalink
Merge pull request #9243 from MATEKSYS/1G3TRAMP
Browse files Browse the repository at this point in the history
Add more power options for 1G3 group
  • Loading branch information
DzikuVx authored Oct 27, 2023
2 parents 6bde5b0 + 3a851e0 commit 4b88ac0
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/main/io/vtx_tramp.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,27 @@ const char * const trampPowerNames_5G8_800[VTX_TRAMP_5G8_MAX_POWER_COUNT + 1] =
const uint16_t trampPowerTable_1G3_800[VTX_TRAMP_1G3_MAX_POWER_COUNT] = { 25, 200, 800 };
const char * const trampPowerNames_1G3_800[VTX_TRAMP_1G3_MAX_POWER_COUNT + 1] = { "---", "25 ", "200", "800" };

const uint16_t trampPowerTable_1G3_2000[VTX_TRAMP_1G3_MAX_POWER_COUNT] = { 25, 200, 2000 };
const char * const trampPowerNames_1G3_2000[VTX_TRAMP_1G3_MAX_POWER_COUNT + 1] = { "---", "25 ", "200", "2000" };

static void vtxProtoUpdatePowerMetadata(uint16_t maxPower)
{
switch (vtxSettingsConfig()->frequencyGroup) {
case FREQUENCYGROUP_1G3:
vtxState.metadata.powerTablePtr = trampPowerTable_1G3_800;
vtxState.metadata.powerTableCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;
if (maxPower >= 2000) {
vtxState.metadata.powerTablePtr = trampPowerTable_1G3_2000;
vtxState.metadata.powerTableCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;

impl_vtxDevice.capability.powerNames = (char **)trampPowerNames_1G3_800;
impl_vtxDevice.capability.powerCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;
impl_vtxDevice.capability.powerNames = (char **)trampPowerNames_1G3_2000;
impl_vtxDevice.capability.powerCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;
}
else {
vtxState.metadata.powerTablePtr = trampPowerTable_1G3_800;
vtxState.metadata.powerTableCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;

impl_vtxDevice.capability.powerNames = (char **)trampPowerNames_1G3_800;
impl_vtxDevice.capability.powerCount = VTX_TRAMP_1G3_MAX_POWER_COUNT;
}
impl_vtxDevice.capability.bandCount = VTX_TRAMP_1G3_BAND_COUNT;
impl_vtxDevice.capability.channelCount = VTX_TRAMP_1G3_CHANNEL_COUNT;
impl_vtxDevice.capability.bandNames = (char **)vtx1G3BandNames;
Expand Down

0 comments on commit 4b88ac0

Please sign in to comment.