Skip to content

Commit

Permalink
fix(cpn): global functions yaml decode (#5072)
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower authored and pfeerick committed May 27, 2024
1 parent f320dc8 commit 29a37e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion companion/src/firmwares/edgetx/yaml_generalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,11 @@ bool convert<GeneralSettings>::decode(const Node& node, GeneralSettings& rhs)
node["pwrOnSpeed"] >> rhs.pwrOnSpeed;
node["pwrOffSpeed"] >> rhs.pwrOffSpeed;

node["customFn"] >> rhs.customFn;
if (node["customFn"]) {
// decode common for radio GF and model SF and conversion test assumes decoding a model
modelSettingsVersion = radioSettingsVersion;
node["customFn"] >> rhs.customFn;
}

// the GeneralSettings struct is initialised to hardware definition defaults which is fine for new settings
// however when parsing saved settings set all inputs to None and override with parsed values
Expand Down

0 comments on commit 29a37e4

Please sign in to comment.