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

Refuel Time Option Not Saving #5110

Closed
AviationSpotter opened this issue Jun 14, 2021 · 1 comment · Fixed by #5118
Closed

Refuel Time Option Not Saving #5110

AviationSpotter opened this issue Jun 14, 2021 · 1 comment · Fixed by #5118
Labels
Bug Something isn't working

Comments

@AviationSpotter
Copy link
Contributor

Aircraft Version

Development

Build info

{
  "built": "2021-06-13T20:38:36+00:00",
  "ref": "master",
  "sha": "68dfae0ec88ef384acd87da748f52e66f59d9d7e",
  "actor": "MisterChocker",
  "event_name": "manual"
}

Describe the bug

If left refuel time option to either "Instant" or "Fast" then the EFB will save to that option after exiting. Only one option will not save and that is the "Real" option. This occurred when I tried out the other options and afterwards my "Real" option would never save after exiting.

Expected behavior

Refuel time options should save to Real as like it saves with Instant and Fast options. (If anything especially the "Real" refuel time option should save due to the fact that it will be used the most).

Steps to reproduce

  1. On the EFB, navigate to Dispatch -> Fuel
  2. Set your refuel time to either Instant or Fast and afterwards set back to real
  3. Go back to the main menu and load back in the aircraft (do not use the restart button as it's not the same as a complete exit)
  4. Head back to EFB, navigate to Dispatch -> Fuel

References (optional)

A video showing the bug

Refuel.Time.Option.Not.Saving.mp4

Additional info (optional)

No response

Discord Username (optional)

Aviation Spotter#9102

@AviationSpotter AviationSpotter added the Bug Something isn't working label Jun 14, 2021
@BlueberryKing
Copy link
Member

I am pretty sure the issue here is that this if returns false if simVarValue is 0, because 0 is falsy in JS and we use 0 to indicate the refuel rate "real".
https://github.com/flybywiresim/a32nx/blob/5f697b19d622af507ec5ca4854c253d375e105c8/src/instruments/src/Common/persistence.tsx#L75-L77
Easiest fix would be to encode refuel rate "real" with a value other than 0, e.g 3. However I suspect that this could cause issues other parts of the code base using persistent variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants