From ed3d5261cc40887aae5062df239e1aac0e9ef601 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Thu, 29 Aug 2019 18:17:01 +0200 Subject: [PATCH] [Companion] X9D/X9D+/X9D+2019 EEPROM import / export fixes --- companion/src/firmwares/opentx/opentxeeprom.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 76d2ae687..05837c068 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 (IS_TARANIS_X9D(board)) + return 9; return Boards::getCapability(board, Board::Switches); } @@ -2302,6 +2304,8 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, Board::Type board, unsig internalField.Append(new SwitchesWarningField<32>(this, modelData.switchWarningStates, board, version)); else if (IS_TARANIS_X9E(board)) internalField.Append(new SwitchesWarningField<64>(this, modelData.switchWarningStates, board, version)); + else if (IS_TARANIS_X9D(board)) + internalField.Append(new SwitchesWarningField<32>(this, modelData.switchWarningStates, board, version)); else if (IS_TARANIS(board)) internalField.Append(new SwitchesWarningField<16>(this, modelData.switchWarningStates, board, version)); else