Skip to content

Commit

Permalink
fix(cpn): incorrect initialisation of switch warning state if all swi…
Browse files Browse the repository at this point in the history
…tch warnings turned off (#5063)
  • Loading branch information
philmoz authored May 24, 2024
1 parent bb51e2c commit e55b62e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions companion/src/firmwares/edgetx/yaml_modeldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,9 @@ bool convert<ModelData>::decode(const Node& node, ModelData& rhs)
node["switchWarningState"] >> switchWarningState.src_str;
rhs.switchWarningStates = switchWarningState.toCpn();
rhs.switchWarningEnable = ~switchWarningState.enabled;
} else {
rhs.switchWarningStates = 0;
rhs.switchWarningEnable = ~0;
}

node["thrTrimSw"] >> rhs.thrTrimSwitch;
Expand Down

0 comments on commit e55b62e

Please sign in to comment.