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(fuel): turnaround fuel used reset #6876

Merged
merged 1 commit into from
Mar 12, 2022

Conversation

Taz5150
Copy link
Contributor

@Taz5150 Taz5150 commented Mar 9, 2022

Fixes #6862 (partially)

Summary of Changes

With the new EGT cooling constant, the engine maintains a "shutting" state for a long time (instead of switching to "off" state once N2 gets to zero). Due to this change in the engine state model, fuel used was not being reset. This issue is being solved with this PR.

Screenshots (if necessary)

References

Additional context

Discord username (if different from GitHub): TazX [Z+2]#405

Testing instructions

One way to do it:

  1. Start aircraft on runway
  2. Switch SD to ENG and burn some fuel (until it is shown in the SD)
  3. Turn Engine 2 OFF (Master Off) and let it roll back
  4. Switch igniter ON
  5. Start Engine 2
  6. Used fuel should reset to 0

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

@johnpmaguire
Copy link
Contributor

Tested this in the usual situations where an engine would be shut down on the ground. Restarted the engine and fuel used was reset to zero. Tested both eng 1 and 2. Also tested in the air. System worked as expected fuel used was not reset to zero in the air.

A nice fix to a couple of questions in the support channel recently. Exceptionally efficient code change.

Looks good to go to QA if needed probably does not.

Copy link
Contributor

@Saschl Saschl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small remark (not related to this PR).

I noticed https://github.com/flybywiresim/a32nx/blob/eae165b508f398a07c92bd1e340eba8db37f455a/src/fadec/src/EngineControl.h#L1126 animationDeltaTime is never initialized. You probably wanted to use the class member animationDeltaTime here?
https://github.com/flybywiresim/a32nx/blob/eae165b508f398a07c92bd1e340eba8db37f455a/src/fadec/src/EngineControl.h#L18

Anyway not related to this PR but I thought I'd note it.

@mico975
Copy link
Contributor

mico975 commented Mar 10, 2022

Quality Assurance Tester Report

Discord : mico#3145
Object of testing: #6876
Tier of Testing : 1
Date : 10/03/2022

Testing Process:
Started the engine, shut down the engine, restarted the engine and fuel got reset. It works. 🚀
Does not work in the air, as intended.

Negatives:
N/A

Testing Results:
Passed

Conclusions:
Magnificent efficiency in coding 🤣

@Taz5150
Copy link
Contributor Author

Taz5150 commented Mar 10, 2022

Just a small remark (not related to this PR).

I noticed

https://github.com/flybywiresim/a32nx/blob/eae165b508f398a07c92bd1e340eba8db37f455a/src/fadec/src/EngineControl.h#L1126

animationDeltaTime is never initialized. You probably wanted to use the class member animationDeltaTime here?
https://github.com/flybywiresim/a32nx/blob/eae165b508f398a07c92bd1e340eba8db37f455a/src/fadec/src/EngineControl.h#L18

Anyway not related to this PR but I thought I'd note it.

Your are completely right. I used to work with animationDeltaTime to detect pauses, but that is obsolete now. Will make changes in subsequent PRs (need to make sure there is nothing depending on that variable).

Thanks!!!

@aguther aguther added the Exp Available on experimental branch (for testing) label Mar 11, 2022
@davidwalschots davidwalschots changed the title fix(fuel): Turnaround fuel used reset fix(fuel): turnaround fuel used reset Mar 11, 2022
@aguther aguther force-pushed the used_fuel_issue branch 2 times, most recently from 448bfef to 5b7f3b9 Compare March 12, 2022 16:34
@aguther aguther merged commit f7f75f1 into flybywiresim:master Mar 12, 2022
frankkopp pushed a commit to frankkopp/aircraft that referenced this pull request Mar 13, 2022
@tracernz tracernz removed the Exp Available on experimental branch (for testing) label Mar 14, 2022
@Taz5150 Taz5150 deleted the used_fuel_issue branch March 29, 2022 13:45
@2hwk 2hwk added this to the v0.8.0 milestone Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aircraft Turnaround State Values
8 participants