fix(cpn): incorrect initialisation of switch warning state if all switch warnings turned off (#5063)

This commit is contained in:
philmoz
2024-05-25 09:29:36 +10:00
committed by GitHub
parent bb51e2ca7e
commit e55b62e64d
@@ -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;