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

fix(fwc): NW STRG DISC color fix #8747

Merged
merged 9 commits into from
Jul 23, 2024

Conversation

Adoggman
Copy link
Contributor

@Adoggman Adoggman commented Jul 8, 2024

Fixes #8743

Summary of Changes

Changes when the ECAM memo NW STRG DISC turns amber to be in line with the real aircraft (~30 seconds after an engine has fully started).

Screenshots (if necessary)

346340412-236b6d69-a100-48d2-b99d-951da364be05
NW STRG DISC should be green until 30 seconds after you start the first engine, when it should turn amber. After shutting down both engines, it will turn green again.

References

https://youtu.be/YouKucin6fs?t=75

Additional context

Discord username (if different from GitHub):
adoggman

Testing instructions

NW STRG DISC shows up in the ECAM during pushback. You can get it to activate by using the EFT or GSX.
This does not change when the message shows up, but when it changes from green to amber in color.
Previously, it would turn amber as soon as either engine starts were flipped on.
Now, it should turn amber about 30 seconds after the first engine has been fully started.

Using your favorite pushback tool, test that the NW STRG DISC message shows on the ECAM when expected and appears green until 30 seconds after an engine has fully started. Test both starting with engine 1 first and engine 2 first.

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 or flybywire-aircraft-a380-842 download link at the bottom of the page

@Adoggman Adoggman changed the title fix(fwc): Nw strg disc color fix fix(fwc): NW STRG DISC color fix Jul 8, 2024
@BravoMike99
Copy link
Contributor

BravoMike99 commented Jul 8, 2024

The real FWC checks if either engine is running to change the color of the nose wheel steering message (just like the current logic) to amber. You can probably fix the issue by changing the engine state condition without needing to make it dependent on the flight phase, as the engine is considered as fully running when the state is 0 if I'm not mistaken.

@Adoggman
Copy link
Contributor Author

Adoggman commented Jul 8, 2024

The real FWC checks if either engine is running

The video referenced does not show it working that way, it only turns amber after BOTH engines have (at least partially) started. Is there a better/more technical reference?

the engine is considered as fully running when the state is 0 if I'm not mistaken.

If you're talking about A32NX_ENGINE_STATE:

OFF | 0
ON | 1
STARTING | 2
SHUTTING | 3

We could do something like [1, 2].includes(this.engine1State.get()) && [1, 2].includes(this.engine2State.get()) ? 1 : 0 to make it more closely match the current logic, but it still doesn't behave quite like in the video as it turns amber the moment the second engine is started and doesn't have a short delay like in the video.

@lukecologne
Copy link
Member

I can't give you a reference, but it is engine1running || engine2running, but for at least 30s. That is why you observed the delay.
More precisely, running is defined here as N2 greater than some idle threshold. You can look around the rest of the pFWC code, I'm told this or a similar condition is already used multiple times for other warnings

@lukecologne
Copy link
Member

Ah, take a look at engine1CoreAtOrAboveMinIdle and engine2CoreAtOrAboveMinIdle. These are the variables you want, you just need to add a confirm time of 30s to it.

@Adoggman
Copy link
Contributor Author

Adoggman commented Jul 9, 2024

Do you know of any places I can see that are using a timed delay as an example? It seems like adding tracking for how long the engines have been running would make this fix significantly more complicated.

@lukecologne
Copy link
Member

Take at a look at the NXLogicConfirmNode that is used in the pFWC

@Adoggman
Copy link
Contributor Author

Adoggman commented Jul 12, 2024

I changed it to use NXLogicConfirmNode (30 seconds) and engine state.

@2hwk
Copy link
Member

2hwk commented Jul 14, 2024

@lukecologne to approve as well

@LunakisDev
Copy link

LunakisDev commented Jul 17, 2024

Quality Assurance Trainee Report

Discord: LunakisLeaks
Object of testing: #8747
Tier of Testing: 1
Date: 17/7/2024

Testing Process:
Using EFB pushback

  1. Spawned at LCLK .
  2. Started the A/C.
  3. Pushback (Verified that "NW STRG DISC" shows up in the ECAM during pushback).
  4. Verified that "NW STRG DISC" turns amber about 30 seconds after the first engine has been fully started.
  5. Tested both starting with engine 1 first and engine 2 first.

I also did the same test with GSX pushback. (Everything works as expected)

Negatives:
N/A

Testing Results:
Passed

Conclusions:
LGTM

@2hwk 2hwk enabled auto-merge (squash) July 23, 2024 10:41
@2hwk 2hwk merged commit e7160f0 into flybywiresim:master Jul 23, 2024
7 checks passed
@Adoggman Adoggman deleted the nw-strg-disc-color-fix branch July 24, 2024 00:51
@2hwk 2hwk added this to the v0.12.0 milestone Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

fws: NW steer disconnect message amber before engine is fully started & across flights
6 participants