1
0
Fork 0

Revert "go to next waypoint, don't delete intermediate. MCDU only shows next ones, doesn't show historical ones"

t push

This reverts commit 5e19cbd42c.
This commit is contained in:
legoboyvdlp R 2020-02-11 17:01:11 +00:00
parent 5e19cbd42c
commit 95fca8e11e
2 changed files with 6 additions and 7 deletions

View file

@ -96,15 +96,14 @@ var flightPlanController = {
autoSequencing: func() {
if (me.num[2].getValue() > 2) {
if (me.temporaryFlag[0] == 1 and wpID[0][0] == wpID[2][0]) {
#me.deleteWP(0, 0);
me.deleteWP(0, 0);
}
if (me.temporaryFlag[1] == 1 and wpID[1][0] == wpID[2][0]) {
#me.deleteWP(0, 1);
me.deleteWP(0, 1);
}
# me.deleteWP(0, 2, 0, 1);
me.currentToWptIndex.setValue(me.currentToWptIndex.getValue() + 1);
me.deleteWP(0, 2, 0, 1);
}
},
@ -117,7 +116,7 @@ var flightPlanController = {
me.flightplans[n].insertWP(createWP(geo.aircraft_position(), "PPOS"), 0);
},
deleteWP: func(index, n, a = 0, s = 0) { # a = 1, means adding a waypoint via deleting intermediate s = 1, means skip adding discontinuity
deleteWP: func(index, n, a = 0, s = 0) { # a = 1, means adding a waypoint via deleting intermediate
var wp = wpID[n][index].getValue();
if (wp != FMGCdep.getValue() and wp != FMGCarr.getValue() and me.flightplans[n].getPlanSize() > 2) {
if (me.flightplans[n].getWP(index).id != "DISCONTINUITY" and a == 0) { # if it is a discont, don't make a new one

View file

@ -204,11 +204,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th
createPlanList: func() {
me.planList = [];
if (me.temporaryFlagFpln) {
for (var i = fmgc.flightPlanController.currentToWptIndex.getValue(); i < me.plan.getPlanSize(); i += 1) {
for (var i = 0; i < me.plan.getPlanSize(); i += 1) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.plan, me.computer, "yel"));
}
} else {
for (var i = fmgc.flightPlanController.currentToWptIndex.getValue(); i < me.plan.getPlanSize(); i += 1) {
for (var i = 0; i < me.plan.getPlanSize(); i += 1) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.plan, me.computer));
}
}