From 9c7e5ca6eaf3672828785ed70dfd10daaba46397 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 25 Oct 2023 15:05:07 -0700 Subject: [PATCH] rawgpsd: add flag for cold start (#30224) * rawgpsd: add flag for cold start * other datasheet is wrong * keep things in a good state --- system/sensord/rawgps/rawgpsd.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/sensord/rawgps/rawgpsd.py b/system/sensord/rawgps/rawgpsd.py index e710a16920..b947c54872 100755 --- a/system/sensord/rawgps/rawgpsd.py +++ b/system/sensord/rawgps/rawgpsd.py @@ -190,7 +190,13 @@ def setup_quectel(diag: ModemDiag) -> bool: if gps_enabled(): at_cmd("AT+QGPSEND") - #at_cmd("AT+QGPSDEL=0") + + if "GPS_COLD_START" in os.environ: + # deletes all assistance + at_cmd("AT+QGPSDEL=0") + else: + # allow module to perform hot start + at_cmd("AT+QGPSDEL=1") # disable DPO power savings for more accuracy at_cmd("AT+QGPSCFG=\"dpoenable\",0")