fix(cpn): incorrect initialisation of switch warning state if all switch warnings turned off (#5063)
This commit is contained in:
@@ -1334,6 +1334,9 @@ bool convert<ModelData>::decode(const Node& node, ModelData& rhs)
|
|||||||
node["switchWarningState"] >> switchWarningState.src_str;
|
node["switchWarningState"] >> switchWarningState.src_str;
|
||||||
rhs.switchWarningStates = switchWarningState.toCpn();
|
rhs.switchWarningStates = switchWarningState.toCpn();
|
||||||
rhs.switchWarningEnable = ~switchWarningState.enabled;
|
rhs.switchWarningEnable = ~switchWarningState.enabled;
|
||||||
|
} else {
|
||||||
|
rhs.switchWarningStates = 0;
|
||||||
|
rhs.switchWarningEnable = ~0;
|
||||||
}
|
}
|
||||||
|
|
||||||
node["thrTrimSw"] >> rhs.thrTrimSwitch;
|
node["thrTrimSw"] >> rhs.thrTrimSwitch;
|
||||||
|
|||||||
Reference in New Issue
Block a user