diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-03-24 23:16:06 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-03-24 23:16:06 +0000 |
commit | 43ef46afedb59586341baee36c8b2ee998a87433 (patch) | |
tree | 180c6ec64d131d275e3434501592d61b2b9ff069 /nmea_parse.c | |
parent | 57cbdf1a9dadd6c628afb525828ab33ad66f2668 (diff) | |
download | gpsd-43ef46afedb59586341baee36c8b2ee998a87433.tar.gz |
Fix a logic bug that was keeping altitude from persisting when it should.
Diffstat (limited to 'nmea_parse.c')
-rw-r--r-- | nmea_parse.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/nmea_parse.c b/nmea_parse.c index bfd5b874..9d446bda 100644 --- a/nmea_parse.c +++ b/nmea_parse.c @@ -176,19 +176,11 @@ static int processGPRMC(int count, char *field[], struct gps_data_t *out) * code that relies on them won't mistakenly believe it has never * received a fix. */ - if (!(out->seen_sentences & GPGGA) && out->status == STATUS_NO_FIX) { - /* Upgrade to STATUS_FIX - * Do not touch otherwise, may be STATUS_FIX or - * STATUS_DGPS_FIX, cannot tell apart here - */ - out->status = STATUS_FIX; + if (out->status == STATUS_NO_FIX) { + out->status = STATUS_FIX; /* could be DGPS_FIX, we can't tell */ mask |= STATUS_SET; } - if (!(out->seen_sentences & GPGSA && out->fix.mode <= MODE_NO_FIX)) { - /* Upgrade to MODE_2D - * Do not touch otherwise, may be MODE_3D or - * MODE_3D, cannot tell apart here - */ + if (out->fix.mode < MODE_2D) { out->fix.mode = MODE_2D; mask |= MODE_SET; } |