From 496962f037d2879e4c64f4c32fb911738788bb82 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 8 Aug 2013 22:14:44 +0900 Subject: [PATCH] GPS: update notify --- libraries/AP_GPS/GPS.cpp | 3 +++ libraries/AP_GPS/GPS.h | 1 + libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/libraries/AP_GPS/GPS.cpp b/libraries/AP_GPS/GPS.cpp index 2cadc1c2b1..0929749e81 100644 --- a/libraries/AP_GPS/GPS.cpp +++ b/libraries/AP_GPS/GPS.cpp @@ -97,6 +97,9 @@ GPS::update(void) } } } + + // update notify with gps status + notify.flags.gps_status = _status; } void diff --git a/libraries/AP_GPS/GPS.h b/libraries/AP_GPS/GPS.h index abe589ba3d..97962b5be7 100644 --- a/libraries/AP_GPS/GPS.h +++ b/libraries/AP_GPS/GPS.h @@ -11,6 +11,7 @@ #include #include #include +#include /// @class GPS /// @brief Abstract base class for GPS receiver drivers. diff --git a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde index 05fc7a7d31..e8f9d99621 100644 --- a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde +++ b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde @@ -15,9 +15,14 @@ #include #include #include +#include +#include const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER; +// create board led object +AP_BoardLED board_led; + GPS *gps; AP_GPS_Auto GPS(&gps); @@ -31,6 +36,9 @@ void setup() hal.console->println("GPS AUTO library test"); gps = &GPS; gps->init(hal.uartB, GPS::GPS_ENGINE_AIRBORNE_2G); + + // initialise the leds + board_led.init(); } void loop()