From f65c72e0cdcb5bb049dbc178e32ed941d861dd22 Mon Sep 17 00:00:00 2001 From: 3djc Date: Wed, 18 Dec 2019 15:13:05 +0100 Subject: [PATCH] Fix x9lite-s having only 5 switches on simu (#7215) Fixes #7207 --- companion/src/firmwares/boards.cpp | 4 +++- companion/src/firmwares/opentx/opentxeeprom.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/companion/src/firmwares/boards.cpp b/companion/src/firmwares/boards.cpp index 9f42fa9c3..c1fbcb666 100644 --- a/companion/src/firmwares/boards.cpp +++ b/companion/src/firmwares/boards.cpp @@ -329,8 +329,10 @@ int Boards::getCapability(Board::Type board, Board::Capability capability) case Switches: if (IS_TARANIS_X9E(board)) return 18; - else if (IS_TARANIS_X9LITE(board)) + else if (board == Board::BOARD_TARANIS_X9LITE) return 5; + else if (board == Board::BOARD_TARANIS_X9LITES) + return 7; else if (IS_TARANIS_X7(board)) return 8; else if (IS_JUMPER_T12(board)) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 10df6d7a3..9632be9e4 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -45,6 +45,9 @@ inline int MAX_SWITCHES(Board::Type board, int version) if (IS_TARANIS_X9D(board)) return 9; + if (IS_TARANIS_X9LITE(board)) + return 7; + if (IS_JUMPER_T12(board)) return 8;