navd: avoid re-routing back to past waypoints

This commit is contained in:
Adeeb Shihadeh
2022-12-15 10:38:44 -08:00
parent 2ac87a0a45
commit 951ceecadd

View File

@@ -191,6 +191,10 @@ class RouteEngine:
cloudlog.warning("Got empty route response")
self.clear_route()
# clear waypoints to avoid a re-route including past waypoints
# TODO: only clear once we're past a waypoint
self.params.remove('NavDestinationWaypoints')
except requests.exceptions.RequestException:
cloudlog.exception("failed to get route")
self.clear_route()