Skip to content

Commit

Permalink
Don't write empty values.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz committed Jul 1, 2024
1 parent 15c2cd9 commit bb95543
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion companion/src/firmwares/edgetx/yaml_modeldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,8 @@ Node convert<ModelData>::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;
}

Expand Down

0 comments on commit bb95543

Please sign in to comment.