flybywiresim / aircraft

The A32NX & A380X Project are community driven open source projects to create free Airbus aircraft in Microsoft Flight Simulator that are as close to reality as possible.
https://flybywiresim.com
GNU General Public License v3.0
5.15k stars 1.12k forks source link

feat(GSX): 380 Refuel/Door Sync, Harmonize GSX Code and External Power-Sync for 320+380 #9528

Open Fragtality opened 1 week ago

Fragtality commented 1 week ago

Fixes #9383 [maybe 9287 too]

Summary of Changes

Well I just wanted to Port PR 8407 to the 380 and get the Cargo Doors synched and it grew a bit bigger 😅

Screenshots (if necessary)

image image

References

Additional context

Note for Cases with FOB >= planned/desired: GSX can't detect if the Aircraft is defueling and has no Means to send the truck away - we need an Increase of Fuel. So the proposed PR sets the desired Fuel temporarily to a lower Amount and starts Defuel. After that an instant Refuel to the actual desired Value is started. => GSX in any Case gets a Signal that Fuel is finished and the Truck will leave. On the A380 there is currently a Bug within GSX in this Detection, hence the Fuel-Difference is quite high there (5000kg). Once that is fixed in GSX the Value can be lowered in the Future.
Note for Error-Handling: If the Fuel Hose gets disconnected during De/Refueling (GSX Crash, Simconnect Issues, User restarts Couatl), the Integration will set the desired Fuel instantly.
Note on Power-Synch: Power will be reported as avail when Jetway or GPU is connected (== 5). Power will be removed when GPU and Jetway are disconnected or Pushback is active (== 5).
Reason for additional Setting for Power-Sync: When Couatl is restarted, the GSX Power-Sync behaves accordingly: Jetway and GSX GPU are not reported as connected anymore, so it will signal that Ground Power is not available anymore. Depending on the Situation the Plane will go Cold & Dark. Hence a Setting for Users who don't want that.
Interaction with new default Ground Power Management: As explained above the GSX Synch can override the default Management, but that is also vice versa: the default Management might already report Available before the GSX Sync reports that. It is imaginable that some GSX Users only want to receive Power "through" GSX for added Immersion. If we want to support that, the default Management would need to be disabled when the GSX Power-Sync is enabled. Just a Thought for Discussion - I would leave it as is its proposed. It is likely that there are also Users being like "I have GSX I want that" and then be like "buhu FBW bugged, I don't get Power at Gate!" because they forgot they need to call GSX because they had enabled that. 😅
Some Ideas for future PRs on refactoring/further Commonality:


Discord username (if different from GitHub): Fragtality

Testing instructions

Detailed Instructions will follow later! But basically:


How to download the PR for QA

Every new commit to this PR will cause new A32NX and A380X artifacts 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, find and click on the PR Build tab
  4. Click on either flybywire-aircraft-a320-neo, flybywire-aircraft-a380-842 (4K) or flybywire-aircraft-a380-842 (8K) download link at the bottom of the page
Fragtality commented 1 week ago

@2hwk Thanks for the Feedback! 😃

I also got the Recommendation to pull as much identical Gsx Code in the fbw-common Area. I'll incorporate your Suggestion while refactoring it ^^

QA can only be commenced after Chaoz' GPU PR (9470) got merged. Still need to test the "final" Product of that Power-Sync myself first 😅