wip
This commit is contained in:
@@ -137,10 +137,10 @@ def downloader_loop(event):
|
||||
pass
|
||||
|
||||
# @retry(attempts=5, delay=0.2, ignore_failure=True)
|
||||
# def inject_assistance():
|
||||
# cmd = f"mmcli -m any --timeout 30 --location-inject-assistance-data={ASSIST_DATA_FILE}"
|
||||
# subprocess.check_output(cmd, stderr=subprocess.PIPE, shell=True)
|
||||
# cloudlog.info("successfully loaded assistance data")
|
||||
def inject_assistance():
|
||||
cmd = f"mmcli -m any --timeout 30 --location-inject-assistance-data={ASSIST_DATA_FILE}"
|
||||
result = subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
|
||||
cloudlog.info("successfully loaded assistance data")
|
||||
|
||||
@retry(attempts=5, delay=1.0)
|
||||
def setup_quectel(diag: ModemDiag) -> bool:
|
||||
@@ -174,10 +174,10 @@ def setup_quectel(diag: ModemDiag) -> bool:
|
||||
# Do internet assistance
|
||||
at_cmd("AT+QGPSXTRA=1")
|
||||
at_cmd("AT+QGPSSUPLURL=\"NULL\"")
|
||||
# if os.path.exists(ASSIST_DATA_FILE):
|
||||
# ret = True
|
||||
# inject_assistance()
|
||||
# os.remove(ASSIST_DATA_FILE)
|
||||
if os.path.exists(ASSIST_DATA_FILE):
|
||||
ret = True
|
||||
inject_assistance()
|
||||
os.remove(ASSIST_DATA_FILE)
|
||||
#at_cmd("AT+QGPSXTRADATA?")
|
||||
time_str = datetime.datetime.utcnow().strftime("%Y/%m/%d,%H:%M:%S")
|
||||
at_cmd(f"AT+QGPSXTRATIME=0,\"{time_str}\",1,1,1000")
|
||||
|
||||
Reference in New Issue
Block a user