From b87b6d27b7ad6d326745827084ded33cd42cfb9e Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 19 Apr 2020 10:24:06 +0100 Subject: [PATCH] Better bugfix --- Nasal/FMGC/flightplan.nas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index f98c8e12..f4d0203b 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -11,6 +11,8 @@ var courseDistanceFromPrev = nil; var sizeWP = nil; var magTrueError = 0; +var DEBUG_DISCONT = 1; + # Props.getNode var magHDG = props.globals.getNode("/orientation/heading-magnetic-deg", 1); var trueHDG = props.globals.getNode("/orientation/heading-deg", 1); @@ -98,7 +100,7 @@ var flightPlanController = { me.currentToWptIndex.setValue(0); } - # me.addDiscontinuity(1, plan); bugfix for linux! + me.addDiscontinuity(1, plan); bugfix for linux! #todo if plan = 2, kill any tmpy flightplan me.flightPlanChanged(plan); }, @@ -137,6 +139,7 @@ var flightPlanController = { # for these two remember to call flightPlanChanged addDiscontinuity: func(index, plan) { + if (DEBUG_DISCONT) { return; } if (index > 0) { if (me.flightplans[plan].getWP(index).wp_name != "DISCONTINUITY" and me.flightplans[plan].getWP(index - 1).wp_name != "DISCONTINUITY") { me.flightplans[plan].insertWP(createDiscontinuity(), index);