Skip to content

Commit

Permalink
fix(cpn): global functions conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower committed May 26, 2024
1 parent b8a0038 commit c236bb1
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 @@ -555,7 +555,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 c236bb1

Please sign in to comment.