Navigate on openpilot without a comma prime subscription
Added functionality to use navigate on openpilot without a comma prime subscription with a custom set MapBox key. Credit goes to DragonPilot! https: //github.com/dragonpilot-community
This commit is contained in:
@@ -53,6 +53,9 @@ class RouteEngine:
|
||||
if "MAPBOX_TOKEN" in os.environ:
|
||||
self.mapbox_token = os.environ["MAPBOX_TOKEN"]
|
||||
self.mapbox_host = "https://api.mapbox.com"
|
||||
elif self.params.get_int("PrimeType") == 0:
|
||||
self.mapbox_token = self.params.get("MapboxPublicKey", encoding='utf8')
|
||||
self.mapbox_host = "https://api.mapbox.com"
|
||||
else:
|
||||
try:
|
||||
self.mapbox_token = Api(self.params.get("DongleId", encoding='utf8')).get_token(expiry_hours=4 * 7 * 24)
|
||||
|
||||
Reference in New Issue
Block a user