From 103f18191dac7c2557b846e5d023c68cddfb7f80 Mon Sep 17 00:00:00 2001 From: walterroach <37820425+walterroach@users.noreply.github.com> Date: Sat, 7 Nov 2020 22:30:06 -0600 Subject: [PATCH] Move viggen tot check down to pydcs waypoint only. --- gen/aircraft.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 7db7417a..1b8398f9 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1210,15 +1210,16 @@ class PydcsWaypointBuilder: waypoint.alt_type = self.waypoint.alt_type waypoint.name = String(self.waypoint.name) tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint) - if tot is not None and not self._viggen_client_tot(): + if tot is not None: self.set_waypoint_tot(waypoint, tot) return waypoint def set_waypoint_tot(self, waypoint: MovingPoint, tot: timedelta) -> None: self.waypoint.tot = tot - waypoint.ETA = int(tot.total_seconds()) - waypoint.ETA_locked = True - waypoint.speed_locked = False + if not self._viggen_client_tot(): + waypoint.ETA = int(tot.total_seconds()) + waypoint.ETA_locked = True + waypoint.speed_locked = False @classmethod def for_waypoint(cls, waypoint: FlightWaypoint, group: FlyingGroup,