cgpsd: use a real source
old-commit-hash: 4d1b1001526970012364b843cbbb997bfd983842
This commit is contained in:
2
cereal
2
cereal
Submodule cereal updated: cf7bb3e749...93d3df3210
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user