Skip to content

Commit

Permalink
use Cpp shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
flogross89 committed Jan 2, 2025
1 parent a84a035 commit b4cea71
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fbw-a380x/src/wasm/fbw_a380/src/fcdc/Fcdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ FcdcBus Fcdc::update(double deltaTime, bool faultActive, bool isPowered) {
}
Arinc429SignStatus ssm = allPrimsDead ? Arinc429SignStatus::FailureWarning : Arinc429SignStatus::NormalOperation;

LateralLaw systemLateralLaw = allPrimsDead == true
LateralLaw systemLateralLaw = allPrimsDead
? LateralLaw::DirectLaw
: getLateralLawStatusFromBits(bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 19),
bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 20));

PitchLaw systemPitchLaw = allPrimsDead == true
? PitchLaw::DirectLaw
: getPitchLawStatusFromBits(bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 16),
bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 17),
bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 18));
PitchLaw systemPitchLaw = allPrimsDead ? PitchLaw::DirectLaw
: getPitchLawStatusFromBits(bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 16),
bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 17),
bitFromValue(busInputs.prims[masterPrim].fctl_law_status_word, 18));

output.efcsStatus1.setData(0);
output.efcsStatus1.setSsm(Arinc429SignStatus::NormalOperation);
Expand Down

0 comments on commit b4cea71

Please sign in to comment.