diff options
author | Keith Packard <keithp@keithp.com> | 2009-06-04 14:38:45 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-06-04 14:38:45 -0700 |
commit | 7adea9c59c73acd52743446c74fb675e0a1d6d05 (patch) | |
tree | 2ce25066fb42e4fd30b85630f884631649a0b842 /src | |
parent | a0e6bfee635b64092262936c858542318f6fc6dc (diff) |
Format GPS seconds as %02d.%04d to avoid spaces in the value
The aoview GPS parsing code doesn't deal well with spaces in the middle of
the value, so pad the seconds field with a zero as needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao_gps_print.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ao_gps_print.c b/src/ao_gps_print.c index 7e157db5..4dced8f1 100644 --- a/src/ao_gps_print.c +++ b/src/ao_gps_print.c @@ -23,7 +23,7 @@ ao_gps_print(__xdata struct ao_gps_data *gps_data) __reentrant printf("GPS %2d sat", (gps_data->flags & AO_GPS_NUM_SAT_MASK) >> AO_GPS_NUM_SAT_SHIFT);; if (gps_data->flags & AO_GPS_VALID) { - printf(" %2d:%02d:%02d %2d°%2d.%04d'%c %2d°%2d.%04d'%c %5dm\n", + printf(" %2d:%02d:%02d %2d°%02d.%04d'%c %2d°%02d.%04d'%c %5dm\n", gps_data->hour, gps_data->minute, gps_data->second, |