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

fix(cpn): hardware and internal module antenna parameters #3050

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion companion/src/firmwares/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,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 @@ -544,13 +544,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 @@ -767,8 +767,6 @@ int OpenTxFirmware::getCapability(::Capability capability)
IS_JUMPER_TPRO(board) || IS_RADIOMASTER_TX12_MK2(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