dragonpilot for 0.8.9-3

This commit is contained in:
rav4kumar
2021-10-26 22:39:29 -07:00
parent 37192c1aba
commit f3f330886b
347 changed files with 44709 additions and 9016 deletions
+4 -1
View File
@@ -4,11 +4,14 @@ import requests
from datetime import datetime, timedelta
from common.basedir import PERSIST
from selfdrive.version import version
from common.params import Params
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com')
API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com') if not Params().get_bool("dp_api_custom") else Params().get("dp_api_custom_url", encoding='utf-8')
class Api():
def __init__(self, dongle_id):
if "commadotai" in API_HOST and (Params().get_bool("dp_jetson") or Params().get_bool("dp_atl")):
raise RuntimeError("API access is disabled because you are not using custom server and you have jetson enabled.")
self.dongle_id = dongle_id
with open(PERSIST+'/comma/id_rsa') as f:
self.private_key = f.read()