Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Cpp WASM Lightweight Framework #7711

Merged
merged 200 commits into from
Jan 4, 2024
Merged

refactor: Cpp WASM Lightweight Framework #7711

merged 200 commits into from
Jan 4, 2024

Conversation

frankkopp
Copy link
Member

@frankkopp frankkopp commented Jan 14, 2023

Summary of Changes

This PR covers three major topics:

  • Introduction of a CPP Framework for FBW C++ WASM
    • Migration of all flyPad backend modules to the new framework
  • Improving Lighting Presets to load gradually and therefore allowing the knob animations to keep up
  • Splitting the flyPad backend code into A32NX- and A380X-specific parts based on a common code part

Cpp WASM Framework MVP v0.1:

  • Make VAR prefix configurable (compiler flag?)
  • Add hasChanged-flag and check if vars has changed compared to previous read
    • add epsilon delta for change flag
  • Check if values have changed after reading from sim to signal modules if something has changed or not
  • Improve checking for existing vars - use the one if the faster update cycle
  • add simple logging
  • refactor data definition variables to use templates and allow more specialized classes
  • add support for receiving events
  • Migrate LightingPresets, AircraftPresets and Pushback
  • Use better build tools (CMake, Ninja, etc.)
  • add ClientDataArea Variable
  • Key Events
  • Input Events
  • System Events
  • StreamingClientDataAreaVariable

See README.md

Potential future enhancements - out of scope for this PR

  • Migrate existing cpp modules into this (fadec, fbw, etc.)
  • Make it a library
  • Add Unit Test framework
  • Add Logging Framework
  • Add CommBus

Additional improvements to Lighting Presets:

Presets are now loaded gradually so that knobs are actually turn to the correct position.
Previously when a knob has been turn to far in one step the sim's animation wanted to turn the knob in the wrong direction
and became stuck on either 0 or 100 and therefore out of sync of the actual value.
https://user-images.githubusercontent.com/16833201/224556441-95f85c5e-3fc2-4f21-9d19-9adab80d79ce.mp4

Split of former flyPad backend into common, a32nx and a380x specific parts

Aircraft specific parts are minimal now so that adaption to A380X only requires specific aspect.
A380X adaption are not yet done as mostly the aircraft is not ready for them yet (presets). Pushback should already work well.

Discord username (if different from GitHub): Cdr_Maverick#6475

Supporters:
saschl#9432, Sven [de en]# 3752, tracernz#3313

Testing instructions

Test the flyPad related backend features:

  • Aircraft Presets - should work as before
  • Pushback - should work as before
  • Lighting Presets - should work as before with the improvement that setting a preset happens gradually to make the knobs turn correctly

Otherwise there should be no difference for end users.

For Devs: Use the framework if anything needs a Cpp implementation - this is the best testing. As long as the existing functionality (former flyPad backend) works these test can be done while developing new Cpp modules.

How to download the PR for QA

Every new commit to this PR will cause a new A32NX artifact to be created, built, and uploaded.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, click on the bottom PR tab
  4. Click on the A32NX download link at the bottom of the page

@frankkopp frankkopp self-assigned this Jan 14, 2023
@frankkopp frankkopp added Project Anything that is related to the development and organization of the project, not an ingame issue. Not Ready For Review Still draft but needs a GitHub build labels Jan 14, 2023
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 4 times, most recently from d0971ff to 4ef7b32 Compare January 22, 2023 22:19
@frankkopp frankkopp marked this pull request as ready for review January 22, 2023 22:36
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 4 times, most recently from 2ad0886 to 2a771a6 Compare January 28, 2023 22:09
@2hwk 2hwk added this to the v0.10.0 milestone Jan 29, 2023
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 3 times, most recently from 1592933 to 6df36cb Compare February 5, 2023 11:30
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 4 times, most recently from 599bd16 to 91b9637 Compare February 19, 2023 22:16
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 2 times, most recently from ab73a81 to 668e0e4 Compare February 26, 2023 21:58
@frankkopp frankkopp force-pushed the cpp-wasm-framework branch 2 times, most recently from 959fc99 to 4c8a277 Compare March 5, 2023 18:30
@frankkopp frankkopp merged commit b0e45de into master Jan 4, 2024
7 checks passed
@frankkopp frankkopp deleted the cpp-wasm-framework branch January 4, 2024 20:57
@2hwk 2hwk modified the milestones: v0.12.0, v0.11.2 Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project Anything that is related to the development and organization of the project, not an ingame issue. QA Passed QA Ready to Test QA Tier 1
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

6 participants