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

feat(GPU): Implemented more realistic GPU handling #9470

Merged
merged 19 commits into from
Nov 26, 2024

Conversation

Maximilian-Reuter
Copy link
Member

@Maximilian-Reuter Maximilian-Reuter commented Nov 9, 2024

Fixes #[issue_no]

Summary of Changes

This PR intends to make the GPU handling on both aircraft more realistic and immersive.
It mainly does that by decoupling the GPU connection state from the MSFS vars.

As a result you will now be able to disconnect the GPU from the plane even when on a powered stand.

I also fixed an issue in the version checker for the a32nx.

In order to facilitate communication from the EFB via the eventbus to the extrashost, I integrated an eventbus instance into the EFB Wrapper

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub):_chaoz_

Testing instructions

Since this PR implements the same function for both planes the tests will be the same:

  1. spawn C/D at a gate that you know has power
  2. after spawning check that the EXT Power buttons show AVAIL
  3. check that the EFB Ground page shows GPU connected
  4. click the GPU button on the EFB page
  5. AVAIL lights should turn off
  6. click it again
  7. AVAIL lights should come back on
  8. request pushback through some means
  9. pushback
  10. AVAIL lights should turn off the moment you start moving
  11. Go back to the main menu and start a new flight at a stand that you know has no power
  12. after spawning check that the EXT Power buttons dont show AVAIL
  13. check that the EFB Ground page shows GPU disconnected
  14. click the GPU button on the EFB page
  15. button should turn orange and the msfs GPU cart should be called
  16. if airport has a GPU cart then it should evenetually arrive
  17. once it is hooked up the button should turn green and the EXT Power buttons should show AVAIL
  18. click GPU button on EFB again
  19. GPU cart should be sent away and AVAIL lights should turn off

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

@Maximilian-Reuter Maximilian-Reuter changed the title feat(Common/GPU): Implemented more realistic GPU handling feat(GPU): Implemented more realistic GPU handling Nov 9, 2024
@alepouna
Copy link
Member

Are you able to also connect the plane to power if the gate doesn't have gp available? (from the efb gpu btn)

@alepouna alepouna added QA Tier 1 A32NX Related to the A32NX aircraft A380X Related to the A380X aircraft Needs Changelog labels Nov 10, 2024
@Maximilian-Reuter
Copy link
Member Author

Are you able to also connect the plane to power if the gate doesn't have gp available? (from the efb gpu btn)

Yes, if that airport supplies a GPU cart then clicking the EFB button will call it. If not then that call wont be answered. That is the current behavior as well so I didnt change that.

Btw the testinstructions should tell you that ;)

@alepouna
Copy link
Member

Are you able to also connect the plane to power if the gate doesn't have gp available? (from the efb gpu btn)

Yes, if that airport supplies a GPU cart then clicking the EFB button will call it. If not then that call wont be answered. That is the current behavior as well so I didnt change that.

Btw the testinstructions should tell you that ;)

I asked for confirmation because specifically there isn't a mention if there is "phantom power" if you like but good to know now 👍

@tracernz
Copy link
Member

Why do we need to use the event bus to toggle the GPU? Can't we just intercept the MSFS K event (with no passthrough so it doesn't go to the sim), and handle it our way? This means it will work for external clients as well e.g. Mobiflight, SPAD etc.

@Maximilian-Reuter
Copy link
Member Author

Why do we need to use the event bus to toggle the GPU? Can't we just intercept the MSFS K event (with no passthrough so it doesn't go to the sim), and handle it our way? This means it will work for external clients as well e.g. Mobiflight, SPAD etc.

Hmm, not sure why I didnt think of that. Guess I was really deep into the eventbus and just wanted to use it for it :D
I guess I didnt expect people to want to bind stuff that happens on the EFB

@LeDerpLegend
Copy link

LeDerpLegend commented Nov 25, 2024

Quality Assurance Trainee Report

Discord Username : LeDerpLegend
Object of testing : #9470
Aircraft : A32NX & A380X
Simulator: 2020
Tier of Testing : 1
Date : 24/11/2024
Testing Process:

  1. spawn C/D at a gate that you know has power
    
  2. after spawning check that the EXT Power buttons show AVAIL
    
  3. check that the EFB Ground page shows GPU connected
    
  4. click the GPU button on the EFB page
    
  5. AVAIL lights should turn off
    
  6. click it again
    
  7. AVAIL lights should come back on
    
  8. request pushback through some means
    
  9. pushback
    
  10. AVAIL lights should turn off the moment you start moving
    
  11. Go back to the main menu and start a new flight at a stand that you know has no power
    
  12. after spawning check that the EXT Power buttons dont show AVAIL
    
  13. check that the EFB Ground page shows GPU disconnected
    
  14. click the GPU button on the EFB page
    
  15. button should turn orange and the msfs GPU cart should be called
    
  16. if airport has a GPU cart then it should evenetually arrive
    
  17. once it is hooked up the button should turn green and the EXT Power buttons should show AVAIL
    
  18. click GPU button on EFB again
    
  19. GPU cart should be sent away and AVAIL lights should turn off
    

Testing Results:
Steps worked as intended, AVAIL was off and overhead left light was off when GPU was unavailable. AVAIL and overhead left light turn on as expected when GPU cart is connected. GPU disconnects the moment pushback starts to move.

Testing Results:
PASSED

Negatives:
N/A

Notes:
When using GSX, some airports may require use of GSX over MSFS GPU at airports that do not provide a GPU cart by MSFS.
Some airports provide GPU by default at a parking spot that shouldn't have one. (Sim issue? [Yes sim issue, resolved by repositioning aircraft on ground for testing])

@Maximilian-Reuter Maximilian-Reuter enabled auto-merge (squash) November 26, 2024 10:09
@Maximilian-Reuter Maximilian-Reuter merged commit 4618872 into flybywiresim:master Nov 26, 2024
8 checks passed
@denmax18

This comment was marked as off-topic.

Benjozork added a commit to ZigTag/aircraft that referenced this pull request Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A32NX Related to the A32NX aircraft A380X Related to the A380X aircraft QA Passed QA Tier 1
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

8 participants