diff options
author | Keith Packard <keithp@keithp.com> | 2014-07-10 17:07:48 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-07-10 17:35:44 -0700 |
commit | 34d5be68ca23e8beb05db9a480faef63ecc911d0 (patch) | |
tree | bcf27108a1680f6c081f583f25b831fc192ac256 /src/kernel/ao_gps_show.c | |
parent | 0d044af0c5025a63026d05adcab68f265f179668 (diff) |
altos: Extend GPS altitudes to at least 24 bits everywhere
Telemetry gets a special 'mode' flag indicating that 24-bit data is
present; log files get new data and log readers are expected to detect
that via the firmware version number.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_gps_show.c')
-rw-r--r-- | src/kernel/ao_gps_show.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/ao_gps_show.c b/src/kernel/ao_gps_show.c index 3a05e35a..e45cd795 100644 --- a/src/kernel/ao_gps_show.c +++ b/src/kernel/ao_gps_show.c @@ -19,6 +19,8 @@ #include <ao.h> #endif +#include <ao_data.h> + void ao_gps_show(void) __reentrant { @@ -27,7 +29,11 @@ ao_gps_show(void) __reentrant printf ("Date: %02d/%02d/%02d\n", ao_gps_data.year, ao_gps_data.month, ao_gps_data.day); printf ("Time: %02d:%02d:%02d\n", ao_gps_data.hour, ao_gps_data.minute, ao_gps_data.second); printf ("Lat/Lon: %ld %ld\n", (long) ao_gps_data.latitude, (long) ao_gps_data.longitude); - printf ("Alt: %d\n", ao_gps_data.altitude); +#if HAS_WIDE_GPS + printf ("Alt: %ld\n", (long) AO_TELEMETRY_LOCATION_ALTITUDE(&ao_gps_data)); +#else + printf ("Alt: %d\n", AO_TELEMETRY_LOCATION_ALTITUDE(&ao_gps_data)); +#endif printf ("Flags: 0x%x\n", ao_gps_data.flags); printf ("Sats: %d", ao_gps_tracking_data.channels); for (i = 0; i < ao_gps_tracking_data.channels; i++) |