summaryrefslogtreecommitdiff
path: root/cgps.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 15:40:07 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 15:40:07 -0700
commit7f77a6ee8181d2dad323844a6119d9af7fe4f6c9 (patch)
tree037c128f25d493c4e55278f818dc6e04c2695828 /cgps.c
parente2503e70a103e6f78fb613cf6e5486b1adfaec3e (diff)
downloadgpsd-7f77a6ee8181d2dad323844a6119d9af7fe4f6c9.tar.gz
cgps.c: Adjust Speed Err data. It was overrunning the field.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgps.c b/cgps.c
index 9244adfa..fa6b80bb 100644
--- a/cgps.c
+++ b/cgps.c
@@ -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. */