From c9ba1a632bbcf1b77d1a0c0c55aa33cfbf4044bf Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Tue, 28 Dec 2021 14:48:55 +0100 Subject: [PATCH] Fixed custom function repeat param (!1x) --- companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp b/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp index 8fcf1a113..4975a207b 100644 --- a/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp +++ b/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp @@ -216,7 +216,7 @@ Node convert::encode(const CustomFunctionData& rhs) } if (rhs.repeatParam == 0) { def += "1x"; - } else if (rhs.repeatParam == 0xFF) { + } else if (rhs.repeatParam == -1) { def += "!1x"; } else { def += std::to_string(rhs.repeatParam); @@ -350,7 +350,7 @@ bool convert::decode(const Node& node, if (repeat == "1x") { rhs.repeatParam = 0; } else if (repeat == "!1x") { - rhs.repeatParam = 0xFF; + rhs.repeatParam = -1; } else { rhs.repeatParam = std::stoi(repeat); }