From 95fca8e11e70d37c56f823ce6cd5a4d5c3e39d1e Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Tue, 11 Feb 2020 17:01:11 +0000 Subject: [PATCH] Revert "go to next waypoint, don't delete intermediate. MCDU only shows next ones, doesn't show historical ones" t push This reverts commit 5e19cbd42cf9391238d308fa2895680711ecf6f7. --- Nasal/FMGC/flightplan.nas | 9 ++++----- Nasal/MCDU/F-PLN-rework.nas | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index a06bb5bf..4c60ff75 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -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 diff --git a/Nasal/MCDU/F-PLN-rework.nas b/Nasal/MCDU/F-PLN-rework.nas index 697d2956..d178058a 100644 --- a/Nasal/MCDU/F-PLN-rework.nas +++ b/Nasal/MCDU/F-PLN-rework.nas @@ -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)); } }