From 60884b213430c722dad0b9604dde07933265965a Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 2 Sep 2019 17:33:49 +0200 Subject: [PATCH] Attempt to fix #6699 The last file of the issue cannot be opened, but it comes from a previous nightly build? --- companion/src/firmwares/opentx/opentxeeprom.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 9ea3efd0a..f539552c4 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -37,6 +37,8 @@ inline int MAX_SWITCHES(Board::Type board, int version) return 6; if (version <= 218 && (IS_TARANIS_X9D(board) || IS_HORUS(board))) return 8; + if (version <= 218 && (IS_TARANIS_XLITE(board))) + return 4; if (IS_TARANIS_X9D(board)) return 9; return Boards::getCapability(board, Board::Switches); @@ -2794,13 +2796,14 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type internalField.Append(new CharField<17>(this, generalData.currModelFilename, true, "Current model filename")); } else if (IS_TARANIS(board)) { - for (int i=0; i(this, generalData.switchConfig[i])); else internalField.Append(new SpareBitsField<2>(this)); } for (int i=0; i(this, generalData.switchName[i], "Switch name")); } for (int i=0; i(this, generalData.registrationId, "ACCESS Registration ID")); } - if (version >= 219 && (IS_TARANIS_XLITES(board) || IS_HORUS(board))) { + if (version >= 219 && IS_TARANIS_XLITES(board)) { internalField.Append(new SignedField<8>(this, generalData.gyroMax, "Gyro full scale")); internalField.Append(new SignedField<8>(this, generalData.gyroOffset, "Gyro Offset")); }