Skip to content

Commit

Permalink
refactor: Fadec rewrite using Cpp framework (#8547)
Browse files Browse the repository at this point in the history
* Initial scaffolding for new fadec

* Added SIMULATION RATE to base data

* Added SIM ON GROUND to base data

* Initial scaffolding for new EngineControl

* Initial scaffolding for both aircraft

* Remove build code for old fadec

* migrated the common.h code to Fadec.h

* removed simulation time params

* inlined var init

* Code cleanup and documentation

* Renaming of context var

* Added ThrustLimit_A380X class and helper methods in Fadec.h

* Improved insertThousandsSeparator helper

* Merge fix

* Commenting ThrustLimits_A380X.h

* Commenting SimDataStructs.h

* Adding Polynomials_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding Table1502_A380X.hpp

* Adding some commenting to framework classes

* Adding FuelConfiguration class

* Added TODO

* Import fix

* code style fix

* Renamed Class

* changed class access and fixed migrated code

* Added FadecSimData class and implemented initialization of EngineControl

* Added EngineControl_A380X.cpp update()

* Adding some commenting to framework class

* Implemented additional update functions

* Implemented all required functions

* Checked initialize

* Checked update

* Bug fix setting feed tanks

* Fix unit for EGT

* Refactored var access

* Added profiler

* Added more profiler

* Refactored writing and added gauge profiler

* added "using DataDefinitionVector"

* Prepared A32NX fadec migration (wip)

* Improved Pause detection (removed unnecessary read)

* Additional profiler when PROFILING is set

* Added usage commenting to SimpleProfiler

* Added default flag to set data on Sim Object

* Added a flag to turn on/off warning of dirty data read.

* Minor docu fix in AircraftVariable.h

* Prepared A32NX fadec migration (wip)

* Fixed reading of initial pause var

* Added fuel config and data definitions

* Added ThrustLimits_A32NX.hpp

* Added Polynomials_A32NX.hpp

* Added Tables1502_A32NX.hpp

* Fixed to_string_with_zero_padding by making static

* Added initializeEngineControlData

* Added comment

* Added Gph (Gallons per hour) to UNITS

* Added profiler metadata output

* Migration done - debugging wip

* Commenting FuelConfiguration_A32NX.h

* Commenting and cleanup

* Commenting, cleanup and removed a recursion

* Commenting

* Added EngineRatios class

* Migration done - debugging wip

* Fixed engine startup - code working so far

* Moved read only Aircraft Variables to DataDefinition for 50% performance increase for data update

* Further cleanup

* Undo change in logic for fuel used

* Migration A380X done - debugging & testing

* Cleanup and commenting

* Fixed fuel issue on A380X

* Cleanup and commenting

* Removed previous fadec code

* Cleanup and commenting

* Reversed tank order of flyPad Fuel Page

* Cleanup and commenting

* Fix LVar resetting

* Review changes

* Added CHANGELOG.md entry
  • Loading branch information
frankkopp committed Apr 11, 2024
1 parent a8938aa commit 85d0414
Show file tree
Hide file tree
Showing 72 changed files with 6,587 additions and 6,432 deletions.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
1. [FWC] Implement non-cancellable master warning for overspeed and gear not down - @tracernz (Mike)
1. [EFB] Checklist restructure to add more capabilities and use json configs - @frankkopp (Frank Kopp)
1. [FLIGHTMODEL] Landing lights or RAT extended now have drag - @Crocket63 (crocket)
1. [FADEC] Fadec rewrite/cleanup/commenting using cpp framework - @frankkopp (Frank Kopp)

## 0.11.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ background_color = 0,0,0

htmlgauge00 = WasmInstrument/WasmInstrument.html?wasm_module=systems.wasm&wasm_gauge=systems,0,0,1,1
htmlgauge01 = WasmInstrument/WasmInstrument.html?wasm_module=fbw.wasm&wasm_gauge=fbw,0,0,1,1
htmlgauge02 = WasmInstrument/WasmInstrument.html?wasm_module=fadec.wasm&wasm_gauge=FadecGauge,0,0,1,1
htmlgauge02 = WasmInstrument/WasmInstrument.html?wasm_module=fadec-a32nx.wasm&wasm_gauge=Gauge_Fadec,0,0,1,1
htmlgauge03 = WasmInstrument/WasmInstrument.html?wasm_module=extra-backend-a32nx.wasm&wasm_gauge=Gauge_Extra_Backend,0,0,1,1

[VCockpit18]
Expand Down
5 changes: 3 additions & 2 deletions fbw-a32nx/src/wasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ set(OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../out/flybywire-aircraft-a3
add_definitions(-DA32NX)

add_subdirectory(extra-backend-a32nx)
add_subdirectory(fadec_a32nx)

# FIXME: remove the if-clause as soon as all components are using CMake
# these are only here to allow CMake compatible IDEs (JetBrains' Clion for example) to show systax
# highlighting and allow code navigation
if (WIN32)
add_subdirectory(fadec_a320)
add_subdirectory(fbw_a320)
endif ()
26 changes: 0 additions & 26 deletions fbw-a32nx/src/wasm/fadec_a320/CMakeLists.txt

This file was deleted.

9 changes: 0 additions & 9 deletions fbw-a32nx/src/wasm/fadec_a320/README.md

This file was deleted.

75 changes: 0 additions & 75 deletions fbw-a32nx/src/wasm/fadec_a320/build.sh

This file was deleted.

Loading

0 comments on commit 85d0414

Please sign in to comment.