qcomgpsd: use AT helper with retry for all AT commands (#31532)

pull/31535/head
Adeeb Shihadeh 1 year ago committed by GitHub
parent 837b811f9c
commit 34138d0be9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      system/qcomgpsd/qcomgpsd.py

@ -94,11 +94,7 @@ def at_cmd(cmd: str) -> Optional[str]:
return subprocess.check_output(f"mmcli -m any --timeout 30 --command='{cmd}'", shell=True, encoding='utf8')
def gps_enabled() -> bool:
try:
p = subprocess.check_output("mmcli -m any --command=\"AT+QGPS?\"", shell=True)
return b"QGPS: 1" in p
except subprocess.CalledProcessError as exc:
raise Exception("failed to execute QGPS mmcli command") from exc
return "QGPS: 1" in at_cmd("AT+QGPS?")
def download_assistance():
try:

Loading…
Cancel
Save