summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-01-03 16:09:01 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-01-03 16:09:01 +0000
commit05fcee1c373954095a7be95756bd92c7d7105255 (patch)
treea244f73bffb3e83f69f0c941e2bbf764c0bc53a1
parent246ae18918f01f769730926c09b07ab33d296cbe (diff)
downloadgpsd-05fcee1c373954095a7be95756bd92c7d7105255.tar.gz
Improved GSV parsing.
-rw-r--r--gpsd.spec.in4
-rw-r--r--nmea_parse.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/gpsd.spec.in b/gpsd.spec.in
index a2434d1f..949497f7 100644
--- a/gpsd.spec.in
+++ b/gpsd.spec.in
@@ -120,7 +120,9 @@ if [ -d /etc/udev/rules.d/ ]; then rm /etc/udev/rules.d/80-gpsd.rules; fi
%changelog
* Sat Jan 1 2005 Eric S. Raymond <esr@snark.thyrsus.com> - @VERSION@-1
-- More compiler-warning cleanups. Add -k option to xgps.
+- More compiler-warning cleanups. Add -k option to xgps. Improved
+ GPGSV parsing so it copes gracefully if we start in the middle of
+ a sequence.
* Sat Jan 01 2005 Eric S. Raymond <esr@snark.thyrsus.com> - 2.6-1
- Petter Reinholdtsen's fix for gps.py buffering. Fix syntax errors
diff --git a/nmea_parse.c b/nmea_parse.c
index 0a5041bb..e4fef0a6 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -393,9 +393,8 @@ static void processGPGSV(char *sentence, struct gps_data_t *out)
changed |= update_field_i(sentence, fldnum++, &out->PRN[out->satellites]);
changed |= update_field_i(sentence, fldnum++, &out->elevation[out->satellites]);
changed |= update_field_i(sentence, fldnum++, &out->azimuth[out->satellites]);
- if (*(field(sentence, fldnum)))
- changed |= update_field_i(sentence, fldnum, &out->ss[out->satellites]);
- fldnum++; out->satellites++;
+ changed |= update_field_i(sentence, fldnum++, &out->ss[out->satellites]);
+ out->satellites++;
}
/* not valid data until we've seen a complete set of parts */