mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-26 21:53:51 +08:00
navd: avoid re-routing back to past waypoints
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user