diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2004-08-23 20:14:55 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2004-08-23 20:14:55 +0000 |
commit | ca0ef394be04205b387fc1e5d656b1a90cd1e703 (patch) | |
tree | 2b108668369a8b6f50a539654304068fbea0bb91 /gps.c | |
parent | fa71a26b510934bcdbf1ae609b5476fc7d937da9 (diff) | |
download | gpsd-ca0ef394be04205b387fc1e5d656b1a90cd1e703.tar.gz |
Make sure everything shipped to clients by gpsd is NUL-terminated.
Enable '!' and '?' responses to tag data invalid due to no fix or stale.
But this is just a checkpoint; timeouts, and stale data warnings, will
go away in the next commit.
Diffstat (limited to 'gps.c')
-rw-r--r-- | gps.c | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -409,17 +409,20 @@ void update_display(char *message) sprintf(s, "%f", gpsdata.track); XmTextFieldSetString(text_6, s); - switch (gpsdata.mode) { - case 2: - sprintf(s, "2D %sFIX", (gpsdata.status==2) ? "DIFF ": ""); - break; - case 3: - sprintf(s, "3D %sFIX", (gpsdata.status==2) ? "DIFF ": ""); - break; - default: - sprintf(s, "NO FIX"); - break; - } + if (!gpsdata.online) + sprintf(s, "OFFLINE"); + else + switch (gpsdata.mode) { + case 2: + sprintf(s, "2D %sFIX",(gpsdata.status==STATUS_DGPS_FIX)?"DIFF ":""); + break; + case 3: + sprintf(s, "3D %sFIX",(gpsdata.status==STATUS_DGPS_FIX)?"DIFF ":""); + break; + default: + sprintf(s, "NO FIX"); + break; + } XmTextFieldSetString(text_7, s); draw_graphics(&gpsdata); |