Switch from GPLv2 to GPLv2+
[fw/altos] / src / kernel / ao_gps_report.c
index 07201ac235b69cd1656979fae18aaa94327c2d73..39688fea70693816b1cd70630f9b7265a18e4830 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -52,8 +53,12 @@ ao_gps_report(void)
                        gps_log.u.gps_longitude = gps_data.longitude;
                        ao_log_data(&gps_log);
                        gps_log.type = AO_LOG_GPS_ALT;
-                       gps_log.u.gps_altitude.altitude = gps_data.altitude;
-                       gps_log.u.gps_altitude.unused = 0xffff;
+                       gps_log.u.gps_altitude.altitude_low = gps_data.altitude_low;
+#if HAS_WIDE_GPS
+                       gps_log.u.gps_altitude.altitude_high = gps_data.altitude_high;
+#else
+                       gps_log.u.gps_altitude.altitude_high = 0xffff;
+#endif
                        ao_log_data(&gps_log);
                        if (!date_reported && (gps_data.flags & AO_GPS_DATE_VALID)) {
                                gps_log.type = AO_LOG_GPS_DATE;