-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 #8500
Conversation
fixes 8499 add simvar description fix simvar docs
fix fix fix port-back fix fix
still needs a decision if the lvar should be set based on the url param 'airframe' or be hard-coded directly in the extra-host module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this solution better - but still the overall question how the team wants to have this done is still open
} else { | ||
break; | ||
case AircraftType.Unknown: | ||
default: | ||
aircraft = 'other'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would add a console warning as this should not happen in normal circumstances.
@@ -149,7 +149,7 @@ pixel_size = 0,0 | |||
texture = NO_TEXTURE | |||
background_color = 0,0,0 | |||
|
|||
htmlgauge00 = A32NX/ExtrasHost/extras-host.html,0,0,1,1 | |||
htmlgauge00 = A32NX/ExtrasHost/extras-host.html?Airframe=A320_251N,0,0,1,1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't find the A380X panel.cfg change - you would also have to do this there.
Note that is a bit stale but not forgotten, we'll be getting back to this after fsweekend EDIT: For the build_info.json prefix, I think it would make more sense to define this in the .env, this makes sense for this since the build_info.json is generated at build time, so I don't see why this should be controlled via a simvar whether this value is a string or an enum. Unless there is something I am missing entirely. |
Panel.xml documentation: Panel.xml docs: See F/A-18 behaviors/model package for code sample
EDIT: For now we will stick to panel.cfg and transition to defining this prefix as an environment variable (.env). |
@Revyn112 I have merged the repo's remote master branch into my local branch, but as your source branch of this PR is your fork's master branch, I don't wish to force push to your master branch. Let me know if you would like to cherry pick this change, check out commit I'm be using this as the basis for any future rewrite, stay tuned. |
Still waiting for response from PR owner, if not as this is quite a critical issue for everyone, I will be opening a new PR that is sourced from my |
Closing in favour of #8599 which continues on from the last commit. This should also fix 8499 and result in an easier time to deconflict in the VFS, build_info.json as well as helping with other flypad related configuration. Note that the |
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
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.