multilang: nav instructions (#25102)

* Try Chinese nav

* try this

* not sure what does what

* read language setting in navd

* probably not used

Co-authored-by: Willem Melching <willem.melching@gmail.com>
pull/25916/head
Shane Smiskol 3 years ago committed by GitHub
parent 685533a3a1
commit 42210a9910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/navd/navd.py

@ -120,6 +120,10 @@ class RouteEngine:
cloudlog.warning(f"Calculating route {self.last_position} -> {destination}") cloudlog.warning(f"Calculating route {self.last_position} -> {destination}")
self.nav_destination = destination self.nav_destination = destination
lang = self.params.get('LanguageSetting', encoding='utf8')
if lang is not None:
lang = lang.replace('main_', '')
params = { params = {
'access_token': self.mapbox_token, 'access_token': self.mapbox_token,
'annotations': 'maxspeed', 'annotations': 'maxspeed',
@ -128,6 +132,7 @@ class RouteEngine:
'steps': 'true', 'steps': 'true',
'banner_instructions': 'true', 'banner_instructions': 'true',
'alternatives': 'false', 'alternatives': 'false',
'language': lang,
} }
if self.last_bearing is not None: if self.last_bearing is not None:

Loading…
Cancel
Save