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(a32nx/fcu) Fixed FCU ALT selector immediately switching to 1000s when interval selected #9784

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

elliot747
Copy link

Fixes #9699

Summary of Changes

Updated FcuComputer.cpp so that it doesn't run the code if number of turns of the ALT knob are 0 (which is the case where the increment knob is turned). Also had to add logic so that if the currently selected altitude is in hundreds (interval=1000ft), when the ALT knob is moved it doesn't jump by more than 1000ft - e.g. the code would have gone from 6300ft straight to 5000ft when dialling the altitude down with the previous version of the code as round(6300ft - 1000ft) = 5000ft - but we just want 6300ft to go to 6000ft on the first turn of the knob.

Screenshots (if necessary)

References

Behaviour observed on IRL aircraft

Additional context

First time contributing to an opensource project - so I hope I've followed the process right, but I was software engineer at Thales before my 320 TR flying for about 5 years now so hopefully I can contribute a little more going forward.

Discord username (if different from GitHub):

Testing instructions

Select an altitude in 100s of feet. Change the interval selector to 1000s of feet. Note the selected altitude doesn't change, it remains in 100s of feet.
Select an altitude with 100s of feet between 100 and 400ft. Change the interval selector to 1000s of feet. Turn the ALT selector knob to increase altitude, observe it increases the altitude to the next thousand. Repeat, but turn the ALT selector knob to decrease altitude, observe the altitude is just rounded down.
Select an altitude with 100s of feet between 600 and 900ft. Change the interval selector to 1000s of feet. Turn the ALT selector knob to increase altitude, observe it increases the altitude to the next thousand. Repeat, but turn the ALT selector knob to decrease altitude, observe the altitude is rounded down.
Select an altitude with 100s of feet with 500ft (e.g. 1500ft). Change the interval selector to 1000s of feet. Turn the ALT selector knob to increase altitude, observe it increases the altitude to the next thousand. Repeat, but turn the ALT selector knob to decrease altitude, observe the altitude is rounded down.
General testing of other altitude selection behaviour, also check that the minimum selection of 100ft and maximum of 49000ft has been unaffected.

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

@alepouna
Copy link
Member

Thank you for the contribution 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟡 Code Review: Ready for Review
Development

Successfully merging this pull request may close these issues.

Alt 100/1000 selector change affects ALT window value
2 participants