We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c851cf7 commit 6744458Copy full SHA for 6744458
selfdrive/navd/navd.py
@@ -143,8 +143,10 @@ def calculate_route(self, destination):
143
coord = Coordinate.from_mapbox_tuple(c)
144
145
# Last step does not have maxspeed
146
- if (maxspeed_idx < len(maxspeeds)) and ('unknown' not in maxspeeds[maxspeed_idx]):
147
- coord.annotations['maxspeed'] = maxspeed_to_ms(maxspeeds[maxspeed_idx])
+ if (maxspeed_idx < len(maxspeeds)):
+ maxspeed = maxspeeds[maxspeed_idx]
148
+ if ('unknown' not in maxspeed) and maxspeed['speed']:
149
+ coord.annotations['maxspeed'] = maxspeed_to_ms(maxspeed)
150
151
coords.append(coord)
152
maxspeed_idx += 1
0 commit comments