*
* 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
}
}
+#ifdef AO_LED_GPS_LOCK
+
+static struct ao_task ao_gps_lock_task;
+
+static void
+ao_gps_lock(void)
+{
+ for (;;) {
+ if ((gps_data.flags & (AO_GPS_VALID|AO_GPS_COURSE_VALID)) ==
+ (AO_GPS_VALID|AO_GPS_COURSE_VALID))
+ {
+ ao_led_for(AO_LED_GPS_LOCK, AO_MS_TO_TICKS(20));
+ }
+ ao_delay(AO_SEC_TO_TICKS(3));
+ }
+}
+#endif
+
+
static uint8_t erasing_current;
void
#endif
ao_cmd_register(&ao_tracker_cmds[0]);
ao_add_task(&ao_tracker_task, ao_tracker, "tracker");
+#ifdef AO_LED_GPS_LOCK
+ ao_add_task(&ao_gps_lock_task, ao_gps_lock, "gps lock");
+#endif
}