From bb95543c8fe10b13c1aec32be5403e3000803aeb Mon Sep 17 00:00:00 2001 From: philmoz Date: Mon, 1 Jul 2024 15:20:32 +1000 Subject: [PATCH] Don't write empty values. --- companion/src/firmwares/edgetx/yaml_modeldata.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/companion/src/firmwares/edgetx/yaml_modeldata.cpp b/companion/src/firmwares/edgetx/yaml_modeldata.cpp index c3a19a8f83a..22c6f4fe8c1 100644 --- a/companion/src/firmwares/edgetx/yaml_modeldata.cpp +++ b/companion/src/firmwares/edgetx/yaml_modeldata.cpp @@ -1178,7 +1178,8 @@ Node convert::encode(const ModelData& rhs) node["topbarData"] = topbarData; } for (int i = 0; i < MAX_TOPBAR_ZONES; i += 1) - node["topbarWidgetWidth"][std::to_string(i)]["val"] = (int)rhs.topbarWidgetWidth[i]; + if (rhs.topbarWidgetWidth[i] > 0) + node["topbarWidgetWidth"][std::to_string(i)]["val"] = (int)rhs.topbarWidgetWidth[i]; node["view"] = rhs.view; }