From 489f8f45a62dce7e20fef88c08d8b615bf4f5499 Mon Sep 17 00:00:00 2001 From: Antoine Drouin Date: Thu, 22 Feb 2007 01:45:49 +0000 Subject: [PATCH] added led signalisation --- sw/airborne/gps.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sw/airborne/gps.c b/sw/airborne/gps.c index 7271ac7896..edd5f2e8f4 100644 --- a/sw/airborne/gps.c +++ b/sw/airborne/gps.c @@ -35,6 +35,7 @@ #include "ap_downlink.h" #include "infrared.h" #include "nav.h" +#include "led.h" uint16_t last_gps_msg_t; /** cputime of the last gps message */ @@ -65,7 +66,14 @@ void use_gps_pos( void ) { if (GpsFixValid()) { last_gps_msg_t = cpu_time_sec; estimator_update_state_gps(); +#ifdef GPS_LED + LED_TOGGLE(GPS_LED); } + else { + LED_ON(GPS_LED); +#endif + } + DOWNLINK_SEND_GPS(&gps_mode, &gps_utm_east, &gps_utm_north, &gps_course, &gps_alt, &gps_gspeed,&gps_climb, &gps_itow, &gps_utm_zone, &gps_nb_ovrn); static uint8_t i;