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: add reset flight plan on DB switch #7781

Merged
merged 33 commits into from
Feb 24, 2023

Conversation

Maverickwoe
Copy link
Contributor

@Maverickwoe Maverickwoe commented Feb 10, 2023

Fixes #6216

Summary of Changes

Changed the Data/ "A/C" page on MCDU. You can now press on the secondary database. It will not switch to any other database as there is none available but it will

  • erase the flight plan
  • all stored data (waypoints etc)
  • erase weight and fuel.
  • erase cost index, flight level and flight number
    Added also an option to reflect future versions of FMC with confirmation before swapping database.
    Did not implement anything related to FMC position reset, navigation display blank and speed prediction as navigation position has not yet been implemented.

Screenshots (if necessary)

Before:
image
After change :
image

References

Entirely relying on documentation that is listed in the issue #6216 (FMC manual)

database-swap

Additional context

Discord username (if different from GitHub): Garoomf#4683

Testing instructions

Tests on video:
https://youtu.be/7NhjUAVqoa4 - on ground, complete test
https://youtu.be/ndm-00CtlyE - in flight, partial test

Test all combinations of these first steps:

-Setting an origin and destination in MCDU
-Adding additional nav points on the flight plan
-fly or on the ground
-add an additional waypoint in your database (or airport or navaid)
-add flight level, cost index and flight number

Second step
-go in Data/"A/C" page and press on the third button from top on the left.
-a scratch pad message shall appear "CHECK WEIGHT" only if in flight, it should not when on ground
-Verify there is no more any mention of stored data on the same page.
-Verify that the flight plan is blank on the FL PLN page
-Verify that the origin and destination are reset on INIT A, as well as Flight level, index and flight number.
-Verify on INIT B that Weight and fuel data are blanck
-Verify that the speed and heading switch to selected on AP if in flight

Final step:
-Set a new origin/destination in INIT A
-Verify that none of the data listed above reappears.

Side effect :
NOTE that these changes may affect also the STORED DATA erase on the same page.
Verifying that this other feature has not been affected is important too.

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

@Maverickwoe Maverickwoe changed the title feat: add reset flight plan on DB switch feat: add reset flight plan on DB switch Feb 10, 2023
2hwk
2hwk previously requested changes Feb 11, 2023
fbw-a32nx/src/systems/fmgc/src/navigation/Navigation.ts Outdated Show resolved Hide resolved
@2hwk 2hwk added this to the v0.10.0 milestone Feb 11, 2023
@tracernz
Copy link
Member

Might be worth looking into setting up vscode for code formatting.

Maverickwoe and others added 15 commits February 11, 2023 11:23
Co-authored-by: 2hwk <15316958+2hwk@users.noreply.github.com>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…Cockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
…r.ts


Reverted to original since async function issue will be resolved

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
Copy link
Member

@tracernz tracernz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Maverickwoe Maverickwoe marked this pull request as ready for review February 13, 2023 10:45
@mico975
Copy link
Contributor

mico975 commented Feb 17, 2023

Quality Assurance Tester Report

Discord : mico#3145
Object of testing: #7781
Tier of Testing : 1
Date : 17/02/2023

Testing Process:
Test all combinations of these first steps:

-Setting an origin and destination in MCDU
-Adding additional nav points on the flight plan
-fly or on the ground
-add an additional waypoint in your database (or airport or navaid)
-add flight level, cost index and flight number

Second step
-go in Data/"A/C" page and press on the third button from top on the left.
-a scratch pad message shall appear "CHK FUEL" - NOT OK, doesn't appear. CHECK WEIGHT appears in flight.
-Verify there is no more any mention of stored data on the same page. - OK
-Verify that the flight plan is blank on the FL PLN page - OK
-Verify that the origin and destination are reset on INIT A, as well as Flight level, index and flight number. - OK
-Verify on INIT B that Weight and fuel data are blanck - OK
-Verify that the speed and heading switch to selected on AP if in flight - OK

Final step:
-Set a new origin/destination in INIT A
-Verify that none of the data listed above reappears. - OK

Side effect:
NOTE that these changes may affect also the STORED DATA erase on the same page.
Verifying that this other feature has not been affected is important too. - OK

Negatives:
CHK FUEL does not appear, otherwise okay.

Testing Results:
Passed

Conclusions:
LGTM, with a small issue

@Maverickwoe
Copy link
Contributor Author

Quality Assurance Tester Report

Discord : mico#3145 Object of testing: #7781 Tier of Testing : 1 Date : 17/02/2023

Testing Process: Test all combinations of these first steps:

-Setting an origin and destination in MCDU -Adding additional nav points on the flight plan -fly or on the ground -add an additional waypoint in your database (or airport or navaid) -add flight level, cost index and flight number

Second step -go in Data/"A/C" page and press on the third button from top on the left. -a scratch pad message shall appear "CHK FUEL" - NOT OK, doesn't appear. CHECK WEIGHT appears in flight. -Verify there is no more any mention of stored data on the same page. - OK -Verify that the flight plan is blank on the FL PLN page - OK -Verify that the origin and destination are reset on INIT A, as well as Flight level, index and flight number. - OK -Verify on INIT B that Weight and fuel data are blanck - OK -Verify that the speed and heading switch to selected on AP if in flight - OK

Final step: -Set a new origin/destination in INIT A -Verify that none of the data listed above reappears. - OK

Side effect: NOTE that these changes may affect also the STORED DATA erase on the same page. Verifying that this other feature has not been affected is important too. - OK

Negatives: CHK FUEL does not appear, otherwise okay.

Testing Results: Passed

Conclusions: LGTM, with a small issue

Thanks for your verification @mico975
I got lazy and didn't double check the exact message before writing it down in the test procedure, sorry for that.
I updated the test procedure to reflect your results on this item as it is what was expected.
Sorry again !

@beheh
Copy link
Member

beheh commented Feb 23, 2023

@Maverickwoe I've added a reference image to the ticket for the H4 confirmation message. Please make sure your implementation matches it (if it doesn't already). Thanks!

@Maverickwoe
Copy link
Contributor Author

Maverickwoe commented Feb 23, 2023

@Maverickwoe I've added a reference image to the ticket for the H4 confirmation message. Please make sure your implementation matches it (if it doesn't already). Thanks!

Thanks for the image @beheh . Yes, I was aware of it and it is implemented as shown but disabled by config in my code for now.
We'll have to change
const confirmDataBaseSwitch = true
in the IdentPage.js to see the double step confirmation and this specific message.
As the version of MCDU we're targeting does not include this message, I purposely disabled it until we change our target.
image

Note that I just committed a change to display the date in amber instead of red. I was shown an image that suggested it was red, not amber but will take yours as reference.

Copy link
Member

@tracernz tracernz left a comment

Choose a reason for hiding this comment

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

Looking at the testing instructions, I don't beleive a CHECK WEIGHT message should be generated. Perhaps there is something not quite right with it's logic.

Co-authored-by: Michael Corcoran <tracer@outlook.co.nz>
@tracernz tracernz enabled auto-merge (squash) February 24, 2023 10:22
@tracernz tracernz merged commit 76bc462 into flybywiresim:master Feb 24, 2023
@Maverickwoe Maverickwoe deleted the a32nx-DataBaseSwitchReset branch February 24, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch database to clear current flight plan
5 participants