From 050662fdd03ea042be3090ae9853356cf8d29a55 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sat, 9 Mar 2024 23:33:24 -0800 Subject: [PATCH] cgpsd: use a real source old-commit-hash: 4d1b1001526970012364b843cbbb997bfd983842 --- cereal | 2 +- system/qcomgpsd/cgpsd.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cereal b/cereal index cf7bb3e749..93d3df3210 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit cf7bb3e74974879abef94286fab4d39398fe402b +Subproject commit 93d3df3210a8c4f4c7e6f45950f73dc8a2f09a2c diff --git a/system/qcomgpsd/cgpsd.py b/system/qcomgpsd/cgpsd.py index 04a92d4a45..54d3c623f3 100755 --- a/system/qcomgpsd/cgpsd.py +++ b/system/qcomgpsd/cgpsd.py @@ -57,6 +57,10 @@ def main(): # TODO: read from streaming AT port instead of polling out = at_cmd("AT+CGPS?") + if '+CGPS: 1' not in out: + for c in cmds: + at_cmd(c) + sentences = out.split("'")[1].splitlines() new = {l.split(',')[0]: l.split(',') for l in sentences if l.startswith('$G')} nmea.update(new) @@ -85,8 +89,7 @@ def main(): gps.hasFix = gnrmc[1] == 'A' - # TODO: make our own source - gps.source = log.GpsLocationData.SensorSource.qcomdiag + gps.source = log.GpsLocationData.SensorSource.unicore gps.speed = sfloat(gnrmc[7]) gps.bearingDeg = sfloat(gnrmc[8])