From a3bcf54cb69a045c0eefe7884bffd7cc95d1e4b9 Mon Sep 17 00:00:00 2001 From: elecpower Date: Fri, 26 Aug 2022 22:26:59 +1000 Subject: [PATCH] Fix yaml writing pots and sliders --- companion/src/firmwares/boards.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/companion/src/firmwares/boards.cpp b/companion/src/firmwares/boards.cpp index 66dda6166..da3bb1db1 100644 --- a/companion/src/firmwares/boards.cpp +++ b/companion/src/firmwares/boards.cpp @@ -560,6 +560,10 @@ StringTagMappingTable Boards::getAnalogNamesLookupTable(Board::Type board) if (IS_SKY9X(board)) { tbl.insert(tbl.end(), {"P1", "P2", "P3"}); + } else if (IS_TARANIS_X9LITE(board)) { + tbl.insert(tbl.end(), { + {"S1", "POT1"}, + }); } else if (IS_TARANIS_X9E(board)) { tbl.insert(tbl.end(), { {"F1", "POT1"}, @@ -578,7 +582,12 @@ StringTagMappingTable Boards::getAnalogNamesLookupTable(Board::Type board) {"GyrX", "GYRO1"}, {"GyrY", "GYRO2"}, }); - } else if (IS_TARANIS(board)) { + } else if ((IS_TARANIS_SMALL(board) && !IS_JUMPER_TLITE(board)) || IS_FLYSKY_NV14(board)) { + tbl.insert(tbl.end(), { + {"S1", "POT1"}, + {"S2", "POT2"}, + }); + } else if (IS_TARANIS_X9(board)) { tbl.insert(tbl.end(), { {"S1", "POT1"}, {"S2", "POT2"}, @@ -598,11 +607,6 @@ StringTagMappingTable Boards::getAnalogNamesLookupTable(Board::Type board) {"JSx", "MOUSE1"}, {"JSy", "MOUSE2"}, }); - } else if (IS_FLYSKY_NV14(board)) { - tbl.insert(tbl.end(), { - {"S1", "POT1"}, - {"S2", "POT2"}, - }); } else if (IS_HORUS_X10(board) || IS_FAMILY_T16(board)) { tbl.insert(tbl.end(), { {"S1", "S1"},