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

Engine 2 used fuel does not reset for second leg #6301

Closed
mico975 opened this issue Dec 4, 2021 · 4 comments · Fixed by #6284
Closed

Engine 2 used fuel does not reset for second leg #6301

mico975 opened this issue Dec 4, 2021 · 4 comments · Fixed by #6284
Labels
Bug Something isn't working Fuel Everything related to fuel systems, pumps, tanks (ata-28)

Comments

@mico975
Copy link
Contributor

mico975 commented Dec 4, 2021

Aircraft Version

Development

Build info

{
  "built": "2021-12-02T01:37:49+00:00",
  "ref": "master",
  "sha": "8dc5bc79bbbd69f4a90c20816c0ea5e22575cbad",
  "actor": "tracernz",
  "event_name": "manual"
}

Describe the bug

When doing multiple legs engine 2 used fuel doesn't reset on engine start for second leg. Engine 2 start instead resets engine 1 used fuel. Engine 1 used fuel reset works correctly.

Expected behavior

Engine 2 to reset used fuel for engine 2.

Steps to reproduce

  1. Fly a normal flight.
  2. Shutdown and prepare for next leg.
  3. Start engine 2 normally and it resets used fuel for engine 1.

References (optional)

image

Additional info (optional)

I suspect it is just a single wrong simvar (FuelUsedLeft instead of FuelUsedRight) in the EngineControl file but I can't really confirm as I'm too dumb to build the thing myself.

Discord Username (optional)

Mico#3145

@mico975 mico975 added the Bug Something isn't working label Dec 4, 2021
@johnpmaguire
Copy link
Contributor

I checked the code in enginecontrol.h The code from issue #5486 is still the same.
Engine 1 still works as expected.
When engine 2 is restarted it resets the fuel used for engine 1.

There are several different named vars used for fuel used now. It could that this is a display issue in the ECAM code or somewhere outside of enginecontrol.h the setFuelUsedRight is updated.

I have not kept track of this function. It worked correctly at the time, but when it broke?

@mico975
Copy link
Contributor Author

mico975 commented Dec 4, 2021

I just had a brief look at the code to see if I could find anything and this looked suspicious. I'm not familiar with the actual coding of anything so I guess I am wrong and someone more competent needs to look at this.

I believe it broke after #5895 got merged or somewhere around that time but could be wrong because I only noticed it after doing multiple legs shortly after.

Edit: Closure of the issue after this comment was a misclick.

@mico975 mico975 closed this as completed Dec 4, 2021
@mico975 mico975 reopened this Dec 4, 2021
@2hwk 2hwk added the Fuel Everything related to fuel systems, pumps, tanks (ata-28) label Dec 8, 2021
@johnpmaguire
Copy link
Contributor

This appears to have occurred when the fuel reset was moved from engine state = 2 to engine state = 1. The attached pic shows that setFuelUsedLeft has been used twice for engine 1 and engine 2.
image

@Taz5150
Copy link
Contributor

Taz5150 commented Dec 12, 2021

Thank you @John-UK for finding the problem with this issue. I have made a small fix in the code for PR#6284 which should be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fuel Everything related to fuel systems, pumps, tanks (ata-28)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants