From 229f4c1d8facdd9c016955455bdbe408cdb3c6d1 Mon Sep 17 00:00:00 2001 From: elecpower Date: Wed, 31 Jan 2024 20:46:28 +1100 Subject: [PATCH] Fix parsing SF refs to LUA script output (#4589) --- companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp b/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp index 87f4ec1f931..cc903f40e52 100644 --- a/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp +++ b/companion/src/firmwares/edgetx/yaml_customfunctiondata.cpp @@ -321,6 +321,11 @@ bool convert::decode(const Node& node, case FuncBacklight: { std::string src_str; getline(def, src_str, ','); + if (def_str.size() >= 4 && def_str.substr(0, 4) == "lua(") { + std::string tmp_str; + getline(def, tmp_str, ','); + src_str += ("," + tmp_str); + } rhs.param = YamlRawSourceDecode(src_str).toValue(); } break; case FuncAdjustGV1: {