Skip to content

Commit

Permalink
fix(cpn): Align Internal/External antenna parameters with radio (Edge…
Browse files Browse the repository at this point in the history
…TX#3050)

* fix(cpn): internal module antenna parameters

* Add xjt filter to model settings antenna
  • Loading branch information
Neil Horne authored Feb 27, 2023
1 parent a8e4bdd commit 8ee0336
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 127 deletions.
2 changes: 1 addition & 1 deletion companion/src/firmwares/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ inline bool HAS_LARGE_LCD(Board::Type board)

inline bool HAS_EXTERNAL_ANTENNA(Board::Type board)
{
return (board == Board::BOARD_X10 || board == Board::BOARD_HORUS_X12S || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board)));
return (IS_FAMILY_HORUS(board) || IS_FAMILY_T16(board) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board)));
}

inline bool IS_TARANIS_X9DP_2019(Board::Type board)
Expand Down
1 change: 0 additions & 1 deletion companion/src/firmwares/eeprominterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ enum Capability {
HasAux2SerialMode,
HasVCPSerialMode,
HasBluetooth,
HasAntennaChoice,
HasADCJitterFilter,
HasTelemetryBaudrate,
TopBarZones,
Expand Down
4 changes: 2 additions & 2 deletions companion/src/firmwares/generalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,13 @@ FieldRange GeneralSettings::getTxCurrentCalibration()
}

// static
AbstractStaticItemModel * GeneralSettings::antennaModeItemModel()
AbstractStaticItemModel * GeneralSettings::antennaModeItemModel(bool model_setup)
{
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName(AIM_GS_ANTENNAMODE);

for (int i = ANTENNA_MODE_FIRST; i <= ANTENNA_MODE_LAST; i++) {
mdl->appendToItemList(antennaModeToString(i), i);
mdl->appendToItemList(antennaModeToString(i), i, model_setup ? i != ANTENNA_MODE_PER_MODEL : true);
}

mdl->loadItemList();
Expand Down
2 changes: 1 addition & 1 deletion companion/src/firmwares/generalsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class GeneralSettings {
static FieldRange getTxCurrentCalibration();
static QString uartSampleModeToString(int value);

static AbstractStaticItemModel * antennaModeItemModel();
static AbstractStaticItemModel * antennaModeItemModel(bool model_setup = false);
static AbstractStaticItemModel * bluetoothModeItemModel();
static AbstractStaticItemModel * serialModeItemModel(int port_nr);
static AbstractStaticItemModel * internalModuleBaudrateItemModel();
Expand Down
2 changes: 0 additions & 2 deletions companion/src/firmwares/opentx/opentxinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,6 @@ int OpenTxFirmware::getCapability(::Capability capability)
IS_JUMPER_TPRO(board) || IS_RADIOMASTER_TX12_MK2(board) || IS_RADIOMASTER_BOXER(board);
case HasBluetooth:
return (IS_FAMILY_HORUS_OR_T16(board) || IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board)|| IS_TARANIS_X9E(board) || IS_TARANIS_X9DP_2019(board) || IS_FLYSKY_NV14(board)) ? true : false;
case HasAntennaChoice:
return ((IS_FAMILY_HORUS_OR_T16(board) && board != Board::BOARD_X10_EXPRESS) || (IS_TARANIS_XLITE(board) && !IS_TARANIS_XLITES(board))) ? true : false;
case HasADCJitterFilter:
return IS_HORUS_OR_TARANIS(board);
case HasTelemetryBaudrate:
Expand Down
Loading

0 comments on commit 8ee0336

Please sign in to comment.