go to next waypoint, don't delete intermediate. MCDU only shows next ones, doesn't show historical ones
This commit is contained in:
parent
79de4a14bc
commit
5e19cbd42c
2 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue