Switch from GPLv2 to GPLv2+
[fw/altos] / src / drivers / ao_gps_sirf.c
index 91fc948b466fa18935fd5d3b6d34f5f65ce4cc83..8bebd61012a123b8c1ec017966770868877a2636 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
@@ -19,6 +20,7 @@
 #include "ao.h"
 #endif
 
+__xdata uint8_t ao_gps_new;
 __xdata uint8_t ao_gps_mutex;
 __pdata uint16_t ao_gps_tick;
 __xdata struct ao_telemetry_location   ao_gps_data;
@@ -422,8 +424,9 @@ ao_gps(void) __reentrant
                        else
                                ao_gps_data.v_error = ao_sirf_data.v_error / 100;
 #endif
+                       ao_gps_new |= AO_GPS_NEW_DATA;
                        ao_mutex_put(&ao_gps_mutex);
-                       ao_wakeup(&ao_gps_data);
+                       ao_wakeup(&ao_gps_new);
                        break;
                case 4:
                        ao_mutex_get(&ao_gps_mutex);
@@ -432,8 +435,9 @@ ao_gps(void) __reentrant
                                ao_gps_tracking_data.sats[i].svid = ao_sirf_tracker_data.sats[i].svid;
                                ao_gps_tracking_data.sats[i].c_n_1 = ao_sirf_tracker_data.sats[i].c_n_1;
                        }
+                       ao_gps_new |= AO_GPS_NEW_TRACKING;
                        ao_mutex_put(&ao_gps_mutex);
-                       ao_wakeup(&ao_gps_tracking_data);
+                       ao_wakeup(&ao_gps_new);
                        break;
                }
        }