diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-25 15:40:07 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-25 15:40:07 -0700 |
commit | 7f77a6ee8181d2dad323844a6119d9af7fe4f6c9 (patch) | |
tree | 037c128f25d493c4e55278f818dc6e04c2695828 /cgps.c | |
parent | e2503e70a103e6f78fb613cf6e5486b1adfaec3e (diff) | |
download | gpsd-7f77a6ee8181d2dad323844a6119d9af7fe4f6c9.tar.gz |
cgps.c: Adjust Speed Err data. It was overrunning the field.
Diffstat (limited to 'cgps.c')
-rw-r--r-- | cgps.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -163,12 +163,12 @@ static char *dop_to_str(double dop) /* format an EP into a string, handle NAN, INFINITE */ static char *ep_to_str(double ep, double factor, char *units) { - static char buf[128]; + static char buf[20]; if (isfinite(ep) == 0) { return " n/a "; } - (void)snprintf(buf, sizeof(buf), "+/-%4.1f %.10s", ep * factor, units); + (void)snprintf(buf, sizeof(buf), "+/-%5.1f %.8s", ep * factor, units); return buf; } @@ -824,7 +824,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata, char *message) /* Fill in the estimated speed error, EPS. */ ep_str = ep_to_str(gpsdata->fix.eps, speedfactor, speedunits); (void)mvwprintw(datawin, row++, DATAWIN_VALUE_OFFSET + 8, - " %-*s", 11, + " %-*s", 12, ep_str); /* Fill in the estimated track error, EPD. */ |