1
0
Fork 0

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

This commit is contained in:
legoboyvdlp R 2020-02-11 14:30:28 +00:00
parent 79de4a14bc
commit 5e19cbd42c
2 changed files with 7 additions and 6 deletions

View file

@ -96,14 +96,15 @@ 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.deleteWP(0, 2, 0, 1);
me.currentToWptIndex.setValue(me.currentToWptIndex.getValue() + 1);
}
},
@ -116,7 +117,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
deleteWP: func(index, n, a = 0, s = 0) { # a = 1, means adding a waypoint via deleting intermediate s = 1, means skip adding discontinuity
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 = 0; i < me.plan.getPlanSize(); i += 1) {
for (var i = fmgc.flightPlanController.currentToWptIndex.getValue(); 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 = 0; i < me.plan.getPlanSize(); i += 1) {
for (var i = fmgc.flightPlanController.currentToWptIndex.getValue(); i < me.plan.getPlanSize(); i += 1) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.plan, me.computer));
}
}