Kaynağa Gözat

do not overwrite the last waypoint if it is already set up

Sven Czarnian 3 yıl önce
ebeveyn
işleme
01b12b4398
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      aman/sys/aco/Node.py

+ 2 - 1
aman/sys/aco/Node.py

@@ -124,7 +124,8 @@ class Node:
             if flownDistance >= self.PredictedDistanceToIAF:
                 flightTimeOnStarSeconds += 10
             if flownDistance >= trackmiles:
-                self.updateArrivalWaypoint(arrivalRoute, flightTimeSeconds, currentPosition[0], currentIAS, currentPosition[1])
+                if None == arrivalRoute[-1].FlightTime:
+                    self.updateArrivalWaypoint(arrivalRoute, flightTimeSeconds, currentPosition[0], currentIAS, currentPosition[1])
                 break
 
             # check if we follow a new waypoint pair