can also do this, but i don't like modifying the response

pull/29034/head
Shane Smiskol 2 years ago
parent 744ef80698
commit 43c48bc39b
  1. 3
      selfdrive/navd/navd.py

@ -169,6 +169,9 @@ class RouteEngine:
r = resp.json() r = resp.json()
if len(r['routes']): if len(r['routes']):
self.route = r['routes'][0]['legs'][0]['steps'] self.route = r['routes'][0]['legs'][0]['steps']
if len(self.route) > 1 and not len(self.route[-1]['bannerInstructions']):
self.route[-1]['bannerInstructions'] = self.route[-2]['bannerInstructions']
self.route_geometry = [] self.route_geometry = []
maxspeed_idx = 0 maxspeed_idx = 0

Loading…
Cancel
Save