From 6b8175835b8a2abd55deac61b6edd4daf0c3a583 Mon Sep 17 00:00:00 2001 From: elecpower Date: Sun, 28 Nov 2021 19:39:32 +1100 Subject: [PATCH] Add capability test for models list file --- companion/src/firmwares/eeprominterface.h | 3 ++- companion/src/firmwares/opentx/opentxinterface.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/companion/src/firmwares/eeprominterface.h b/companion/src/firmwares/eeprominterface.h index 099501c9d..d8e3fff1f 100644 --- a/companion/src/firmwares/eeprominterface.h +++ b/companion/src/firmwares/eeprominterface.h @@ -163,7 +163,8 @@ enum Capability { HasADCJitterFilter, HasTelemetryBaudrate, TopBarZones, - FunctionSwitches + FunctionSwitches, + HasModelList }; class EEPROMInterface diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp index 1afb13482..2ca769f35 100644 --- a/companion/src/firmwares/opentx/opentxinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -752,14 +752,15 @@ int OpenTxFirmware::getCapability(::Capability capability) 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) ? true : false; + return IS_HORUS_OR_TARANIS(board); case HasTelemetryBaudrate: - return IS_HORUS_OR_TARANIS(board) ? true : false; + return IS_HORUS_OR_TARANIS(board); case TopBarZones: return getCapability(LcdWidth) > getCapability(LcdHeight) ? 4 : 2; case FunctionSwitches: return IS_JUMPER_TPRO(board) ? 6 : 0; - + case HasModelsList: + return IS_FAMILY_HORUS_OR_T16(board); default: return 0; }