1
0
Fork 0

Remove the MANUAL discontinuity; because it kept adding more discontinuities

This commit is contained in:
Jonathan Redpath 2022-05-23 17:34:54 +01:00
parent ebfaa28637
commit 5e7d132c19
3 changed files with 12 additions and 13 deletions

View file

@ -264,7 +264,7 @@ var FCUController = {
if (me.FCUworking) {
if (fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue() or fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
var wp = fmgc.flightPlanController.flightplans[2].getWP(fmgc.flightPlanController.currentToWptIndex.getValue());
if (wp != nil and wp.wp_type != "discontinuity") {
if (wp != nil and wp.wp_type != "discontinuity" and wp.wp_type != "vectors") {
fmgc.Input.lat.setValue(1);
}
}

View file

@ -75,12 +75,6 @@ var A320RouteManagerDelegate = {
}
me.flightplan.insertWaypoints(wps, 1);
for (var wpIdx = 0; wpIdx < me.flightplan.getPlanSize(); wpIdx = wpIdx + 1) {
if (me.flightplan.getWP(wpIdx).wp_type == "vectors" and (me.flightplan.getWP(wpIdx + 1) == nil or me.flightplan.getWP(wpIdx + 1).wp_type != "discontinuity")) {
me.flightplan.insertWP(createDiscontinuity(), wpIdx + 1);
}
}
},
arrivalChanged: func
@ -272,6 +266,12 @@ var A320GPSDelegate = {
} elsif (me.flightplan.nextWP().wp_type != 'discontinuity' and me.flightplan.nextWP().wp_type != 'vectors') {
logprint(LOG_INFO, "default GPS sequencing to next WP");
me.flightplan.current = me.flightplan.current + 1;
} else {
logprint(LOG_INFO, "default GPS sequencing to next WP (special)");
fmgc.Input.lat.setValue(3);
if (me.flightplan.nextWP().wp_type == 'vectors') {
me.flightplan.current = me.flightplan.current + 2;
}
}
} else {
# OBS, do nothing

View file

@ -226,14 +226,11 @@ var flightPlanController = {
# TODO - triple click - confirm, is it only with DES disengage, or also with the NAV loss?
# TODO - I think that it only goes to VS when in DES mode
if (me.flightplans[2].getWP(me.currentToWptIndexTemp + 1).wp_type == "discontinuity") {
if (me.flightplans[2].getWP(me.currentToWptIndexTemp + 1).wp_type == "discontinuity" or me.flightplans[2].getWP(me.currentToWptIndexTemp + 1).wp_type == "vectors") {
fmgc.Input.lat.setValue(3);
me.currentToWptIndex.setValue(me.currentToWptIndexTemp + 2);
me.lastSequencedCurrentWP = me.currentToWptIndexTemp + 2;
} else {
if (me.flightplans[2].getWP(me.currentToWptIndexTemp + 1).wp_type == "vectors") {
fmgc.Input.lat.setValue(3);
me.flightplans[2].deleteWP(me.currentToWptIndexTemp + 2);
}
me.currentToWptIndex.setValue(me.currentToWptIndexTemp + 1);
me.lastSequencedCurrentWP = me.currentToWptIndexTemp + 1;
@ -271,8 +268,10 @@ var flightPlanController = {
# Optional flag DEBUG_DISCONT to disable discontinuities totally
addDiscontinuity: func(index, plan, force = 0) {
if (DEBUG_DISCONT) { return; }
if (force) {
me.flightplans[plan].insertWP(createDiscontinuity(), index);
return;
}
if (me.flightplans[plan].getWP(index) != nil) { # index is not nil