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: aircraft type check #8612

Closed
wants to merge 21 commits into from
Closed

Conversation

2hwk
Copy link
Member

@2hwk 2hwk commented Apr 5, 2024

Fixes #8499

Summary of Changes

This pull request introduces an AircraftType enum to the common module, fundamentally altering the mechanism for aircraft type verification. Previously, this process depended on matching the SimVar Title, a method that proved unreliable due to its reliance on specific search terms which needs to be added by the Livery Creator. This could result in the incorrect loading of build_info.json. With the proposed changes, upon reaching the Ready state, a new SimVar, "L:A32NX_AIRCRAFT_TYPE", will be assigned a value from the AircraftType enum corresponding to the A32NX. This will enable a more reliable comparison against the enum values to determine the appropriate build_info.json prefix (e.g., a32nx, a380x). Furthermore, this PR ensures consistency across the codebase by replacing static string comparisons for airframe checks with enum comparisons. This approach not only improves the current implementation but also allows for the easy integration of additional airframes in the future.

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub):

Testing instructions

  1. Load up the aircraft.
  2. Check if the EFB Payload Page work and shows the A32NX Layout.
  3. Check if the EFB Service Page work and shows the A32NX Layout.
  4. Check if the EFB Flight Widget show the correct A32NX Information.
  5. Check if the EFB Overview Page show the correct A32NX Information.
  6. Check if the Throttle Config for the A32NX is correct and working.

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

@2hwk 2hwk marked this pull request as draft April 5, 2024 16:34
@2hwk 2hwk closed this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ❌ Cancelled/Unfinished
Development

Successfully merging this pull request may close these issues.

Build_Info.json not loaded within EFB because of non-reliable Aircraft Check
2 participants