rawgpsd: accept alt assistance file (#29202)

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 42e106dd47
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent d016d9fad7
commit e83ade5c18
  1. 5
      system/sensord/rawgps/rawgpsd.py

@ -6,6 +6,7 @@ import itertools
import math
import time
import pycurl
import shutil
import subprocess
from datetime import datetime
from multiprocessing import Process, Event
@ -145,6 +146,10 @@ def downloader_loop(event):
if os.path.exists(ASSIST_DATA_FILE):
os.remove(ASSIST_DATA_FILE)
alt_path = os.getenv("QCOM_ALT_ASSISTANCE_PATH", None)
if alt_path is not None and os.path.exists(alt_path):
shutil.copyfile(alt_path, ASSIST_DATA_FILE)
try:
while not os.path.exists(ASSIST_DATA_FILE) and not event.is_set():
download_assistance()

Loading…
Cancel
Save