1
0
Fork 0

Slight corrections

This commit is contained in:
legoboyvdlp R 2020-03-31 16:48:36 +01:00
parent 2fcfbcb180
commit d8f83979c4
2 changed files with 4 additions and 2 deletions

View file

@ -162,13 +162,13 @@ var flightPlanController = {
me.flightplans[plan].insertWP(createWPFrom(waypointGhost), 2);
me.addDiscontinuity(3, plan);
me.deleteWP(0, plan);
var curAircraftPosDirTo = geo.aircraft_position();
canvas_mcdu.myDirTo[plan].updateDist(me.flightplans[plan].getWP(1).courseAndDistanceFrom(curAircraftPosDirTo)[1]);
} else {
me.insertTP(plan);
#todo
}
me.flightPlanChanged(plan);
var curAircraftPosDirTo = geo.aircraft_position();
canvas_mcdu.myDirTo[plan].updateDist(me.flightplans[plan].getWP(1).courseAndDistanceFrom(curAircraftPosDirTo)[1]);
},
deleteWP: func(index, n, a = 0, s = 0) { # a = 1, means adding a waypoint via deleting intermediate

View file

@ -244,6 +244,7 @@ var dirTo = {
notAllowed(me.computer);
}
me.L1 = [" [ ]", " WAYPOINT", "blu"];
me.R1 = ["---- --- ", "UTC DIST ", "wht"];
},
fieldR6: func() {
if (fmgc.flightPlanController.temporaryFlag[me.computer] and dirToFlag) {
@ -253,6 +254,7 @@ var dirTo = {
notAllowed(me.computer);
}
me.L1 = [" [ ]", " WAYPOINT", "blu"];
me.R1 = ["---- --- ", "UTC DIST ", "wht"];
},
updateDist: func(dist) {
me.R1 = ["---- " ~ sprintf("%.0f", dist) ~ " ", "UTC DIST ", "wht"];