|
|
|
@ -31,13 +31,11 @@ import cereal.messaging as messaging |
|
|
|
|
from cereal import log |
|
|
|
|
from cereal.services import SERVICE_LIST |
|
|
|
|
from openpilot.common.api import Api |
|
|
|
|
from openpilot.common.basedir import PERSIST |
|
|
|
|
from openpilot.common.file_helpers import CallbackReader |
|
|
|
|
from openpilot.common.params import Params |
|
|
|
|
from openpilot.common.realtime import set_core_affinity |
|
|
|
|
from openpilot.system.hardware import HARDWARE, PC, AGNOS |
|
|
|
|
from openpilot.system.loggerd.xattr_cache import getxattr, setxattr |
|
|
|
|
from openpilot.selfdrive.statsd import STATS_DIR |
|
|
|
|
from openpilot.system.swaglog import cloudlog |
|
|
|
|
from openpilot.system.version import get_commit, get_origin, get_short_branch, get_version |
|
|
|
|
from openpilot.system.hardware.hw import Paths |
|
|
|
@ -502,10 +500,10 @@ def startLocalProxy(global_end_event: threading.Event, remote_ws_uri: str, local |
|
|
|
|
|
|
|
|
|
@dispatcher.add_method |
|
|
|
|
def getPublicKey() -> Optional[str]: |
|
|
|
|
if not os.path.isfile(PERSIST + '/comma/id_rsa.pub'): |
|
|
|
|
if not os.path.isfile(Paths.persist_root() + '/comma/id_rsa.pub'): |
|
|
|
|
return None |
|
|
|
|
|
|
|
|
|
with open(PERSIST + '/comma/id_rsa.pub') as f: |
|
|
|
|
with open(Paths.persist_root() + '/comma/id_rsa.pub') as f: |
|
|
|
|
return f.read() |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -641,6 +639,7 @@ def log_handler(end_event: threading.Event) -> None: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def stat_handler(end_event: threading.Event) -> None: |
|
|
|
|
STATS_DIR = Paths.stats_root() |
|
|
|
|
while not end_event.is_set(): |
|
|
|
|
last_scan = 0. |
|
|
|
|
curr_scan = time.monotonic() |
|
|
|
|