Skip to content

Commit

Permalink
Cleanup and commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkopp committed Mar 22, 2024
1 parent 17ad575 commit b81ecad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions fbw-a32nx/src/wasm/fadec_a32nx/src/Fadec/EngineControlA32NX.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

#include "lib/string_utils.hpp"

#include "logging.h"
#ifdef PROFILING
Expand Down Expand Up @@ -53,11 +52,6 @@ void EngineControl_A32NX::update(sGaugeDrawData* pData) {
const double imbalance = simData.engineImbalance->get();
const double idleN2 = simData.engineIdleN2->get();

// Obtain Bleed Variables
const int packs = (simData.packsState[L]->get() > 0.5 || simData.packsState[R]->get() > 0.5) ? 1 : 0;
const int nai = (simData.simVarsDataPtr->data().engineAntiIce[L] > 0.5 || simData.simVarsDataPtr->data().engineAntiIce[R] > 0.5) ? 1 : 0;
const int wai = simData.wingAntiIce->getAsInt64();

generateIdleParameters(pressureAltitude, mach, ambientTemperature, ambientPressure);

double simCN1;
Expand Down Expand Up @@ -135,7 +129,13 @@ void EngineControl_A32NX::update(sGaugeDrawData* pData) {
prevEngineStarterState[engineIdx] = engineStarter;
}

// update fuel & tank data
updateFuel(deltaTime);

// Obtain Bleed Variables and update Thrust Limits
const int packs = (simData.packsState[L]->get() > 0.5 || simData.packsState[R]->get() > 0.5) ? 1 : 0;
const int nai = (simData.simVarsDataPtr->data().engineAntiIce[L] > 0.5 || simData.simVarsDataPtr->data().engineAntiIce[R] > 0.5) ? 1 : 0;
const int wai = simData.wingAntiIce->getAsInt64();
updateThrustLimits(simTime, pressureAltitude, ambientTemperature, ambientPressure, mach, simN1highest, packs, nai, wai);

#ifdef PROFILING
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

#include <algorithm>

#include "logging.h"
#ifdef PROFILING
#include "ScopedTimer.hpp"
Expand Down

0 comments on commit b81ecad

Please sign in to comment.