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

feat(efb): Simrate and Pause at T/D in EFB Quick Settings #8641

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

Conversation

2hwk
Copy link
Member

@2hwk 2hwk commented May 1, 2024

Fixes #[issue_no]

Summary of Changes

  • Adds Pause At Top of Descent toggle to quick settings
  • Adds Simulation Rate Controller to quick settings

Screenshots (if necessary)

image
FlightSimulator_hHGan5IoVq

References

Additional context

Discord username (if different from GitHub):

Testing instructions

  • Check flyPad Settings > Realism - Check that MCDU Input and Pause at TOD Settings options still work as per normal and that there is no regression
  • Quick Settings -> New options: Pause at TOD and Simrate Controller
    • Ensure all localisation screens and hover text work
    • Ensure visually css is not broken (including with other localisation i.e. RU/PL
    • Check that the toggle for pause on TOD works and that this syncs with what is in the Settings > Realism page.
    • Check that the new simrate indicator in the status bar shows the simrate accurately
    • Check that you can increase and decrease the simrate (until limited by our built-in simrate reduction, which should be around 4x for most people)
      • Note that the automatic simrate reduction feature will still affect this, so if simrate is reduced because of low frame rate or performance issues, this is as designed and expected.

Pause on TOD Tests:

  • Expected Behavior/Notes:
    • Button Status/Color: When you first activate this in the Quick Controls the button's background will be orange (and say Standby)
    • NOTE: Critical MSFS Sim Bug possible if you ALT-TAB while panning the camera with the mouse look option (MMD by default). Do NOT Alt-TAB while panning the camera. This will make the pop-up unable to be dismissed and you will have to restart. - As this is already a bug on master this is not considered a regression.
    • Armed State (Green): This will only update to Armed (green background), when all the pre-conditions for Pause on TOD are met.
      • A valid flight plan with a valid T/D must be first calculated (i.e. fill in INIT-B, PERF pages on MCDU).
      • Plane must be in the air - i.e. FMGC flight phase is on either CLIMB or CRUISE.
      • Distance to T/D is equal to or less than the configured T/D pause distance (default 10nm)
      • T/D point has not already been reached.
    • A/P guarding - If the A/P is disconnected ABOVE the inputted transition flight level (default 10000 FT if not specified) the sim will pause and for 10 seconds, pause on T/D will be on standby. This 10s cooldown will be reflected in the Quick Setting button's status.
      • Why A/P guarding: Necessary if A/P is disconnected to pause to prevent plane from going off course.
      • 10s cooldown: This is to prevent repeated activation after unpause that interfere with the user's ability to fly and re-engage A/P as desired.
      • Quirk: This A/P guarding logic i.e. above the transition flight level logic is hidden to the user and is not displayed in the button's status.
        • In the future this may be displayed somehow, but as the two logic gates are independent of each other, this is just for tester's awareness that this exists.
      • After A/P guarding pause, for 10 seconds, Pause on T/D will not be armed. This will be reflected in the button's background colour.
      • Pause due to A/P guarding can be repeated, unlike the pause that occurs when T/D is reached.
    • Important: After T/D is reached and the sim paused. T/D Pause will activate and is then both T/D pause and A/P guarding will be disabled for the rest of the flight, the quick settings button returning to a Standby/orange state until the next turnaround, based on FMGC status (READY/DONE). This means engines must be shutdown and cockpit returned to a turnaround state on the ground after landing.
  • Do a short flight (with init-b/perf pages filled in). Ensure Pause at TOD feature works as per normal after arming it in quick settings menu (green top border visible)
  • Turnaround -> After completing the full proper turnaround procedure, and after departure with another complete flight plan, check that T/D pause is now fully re-enabled and that the Armed (green) state can be entered again, and that pause on T/D works on this turnaround flight.
  • Retry -> Change distance (Settings > Realism - Pause At TOD DIstance) and ensure that pause on T/D correctly pauses at this distance.

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

@2hwk 2hwk changed the title 2c simrate qol feat(efb): Simrate and Pause at TOD in EFB Quick Settings May 1, 2024
@2hwk 2hwk added the Not Ready For Review Still draft but needs a GitHub build label May 1, 2024
@2hwk 2hwk added Needs Code Review and removed Not Ready For Review Still draft but needs a GitHub build labels May 10, 2024
@2hwk
Copy link
Member Author

2hwk commented May 10, 2024

Still needs localisation keys, to be added before merging

@2hwk 2hwk marked this pull request as ready for review May 10, 2024 17:27
@github-actions github-actions bot added this to 🟡 Code Review: Ready for Review in Quality Assurance May 10, 2024
@2hwk 2hwk marked this pull request as draft May 11, 2024 04:28
@2hwk 2hwk added Not Ready For Review Still draft but needs a GitHub build Needs Code Review and removed Needs Code Review Not Ready For Review Still draft but needs a GitHub build labels May 11, 2024
@2hwk 2hwk marked this pull request as ready for review May 12, 2024 14:51
@2hwk 2hwk removed this from 🟡 Code Review: Ready for Review in Quality Assurance May 12, 2024
@github-actions github-actions bot added this to 🟡 Code Review: Ready for Review in Quality Assurance May 12, 2024
package.json Outdated Show resolved Hide resolved
Copy link
Member

@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.

LGTM, let's just check package.json formatting before merging, but not relevant for testing.

Quality Assurance automation moved this from 🟡 Code Review: Ready for Review to 🟣 QA Team Review: Ready to Test May 17, 2024
@2hwk
Copy link
Member Author

2hwk commented May 18, 2024

LGTM, let's just check package.json formatting before merging, but not relevant for testing.

Will fix EDIT: and done

@2hwk 2hwk removed the Do Not Merge label May 18, 2024
@ExampleWasTaken
Copy link
Contributor

I think the simrate box needs UI improvements. At the moment it doesn't align with anything. The clock is neither in the middle of the box nor below the gap between the simbridge and keyboard button.

I suggest centering the clock and displaying the next simrate in the buttons instead of the chevrons.

So if you're at normal simrate, the "previous" button (i.e. decrease) button is disabled. At 4x simrate the left button reads 2x and the right button reads 8x.

The current simrate could be displayed as part of the box title, meaning below the clock. E.g. 4x Simrate

@2hwk
Copy link
Member Author

2hwk commented May 18, 2024

UI improvements will probably need to be in another PR at this stage, I don't anticipate having the bandwidth to adjust it further in the next 2 months. Potentially a good first issue for new contributors.

@2hwk 2hwk added this to the v0.12.0 milestone May 18, 2024
@2hwk 2hwk changed the title feat(efb): Simrate and Pause at TOD in EFB Quick Settings feat(efb): Simrate and Pause at T/D in EFB Quick Settings May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Quality Assurance
🟣 QA Team Review: Ready to Test
Development

Successfully merging this pull request may close these issues.

None yet

3 participants