-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: enable transition from done phase to preflight phase #9664
base: master
Are you sure you want to change the base?
Conversation
@@ -79,6 +87,7 @@ export class MfdUiService { | |||
|
|||
const parsedUri = this.parseUri(nextUri); | |||
this.activeUri.set(parsedUri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we could replace this with the publisher. Then we do not set this in two places.
Thanks a lot for the input 👍 I think the missing switch to the status page on FMS2 can be addressed in another PR, as this one is meant to allow for turnarounds in the first place. We will look into that for sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
@@ -139,6 +151,23 @@ export class FlightManagementComputer implements FmcInterface { | |||
// TODO remove this cyclic dependency, isWaypointInUse should be moved to DataInterface | |||
private dataManager: DataManager | null = null; | |||
|
|||
private readonly flightPhase = ConsumerSubject.create<FmgcFlightPhase>(null, this.flightPhaseManager.phase); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private readonly flightPhase = ConsumerSubject.create<FmgcFlightPhase>(null, this.flightPhaseManager.phase); | |
private readonly flightPhase = ConsumerSubject.create<FmgcFlightPhase>(this.sub.on('fmgc_flight_phase'), this.flightPhaseManager.phase); |
You can do this, if you pull private sub = this.bus.getSubscriber<FlightPhaseManagerEvents & MfdUIData>()
to the class methods, saves you two lines of setConsumer
calls
Fixes #[issue_no]
Summary of Changes
Currently the plane never transitions to done phase, which prevented turnarounds from working properly as it was impossible to enter a new flightplan and performance data (the data is being cleared but the MFD fields are not editable). Added the logic to transition to preflight phase.
Not sure if this is the right way to approach this, suggestions welcome :)
Screenshots (if necessary)
References
Additional context
Discord username (if different from GitHub):
Testing instructions
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.