From 26ecb10288e80355fe5f6380464207f39f09ff73 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Wed, 22 Dec 2021 12:40:58 +0100 Subject: [PATCH] Fixed switches index --- companion/src/firmwares/edgetx/yaml_rawswitch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/firmwares/edgetx/yaml_rawswitch.cpp b/companion/src/firmwares/edgetx/yaml_rawswitch.cpp index 970b4dbd2..4ae567841 100644 --- a/companion/src/firmwares/edgetx/yaml_rawswitch.cpp +++ b/companion/src/firmwares/edgetx/yaml_rawswitch.cpp @@ -135,7 +135,7 @@ RawSwitch YamlRawSwitchDecode(const std::string& sw_str) int sw_idx = getCurrentFirmware()->getSwitchesIndex(sw_str_tmp.substr(0, 2).c_str()); if (sw_idx >= 0) { rhs.type = SWITCH_TYPE_SWITCH; - rhs.index = sw_idx * 3 + val[2] - '0'; + rhs.index = sw_idx * 3 + (val[2] - '0' + 1); } // TODO: SWITCH_TYPE_TIMER_MODE