GPS: update notify

This commit is contained in:
Randy Mackay 2013-08-08 22:14:44 +09:00 committed by Andrew Tridgell
parent 46c24fdf39
commit 496962f037
3 changed files with 12 additions and 0 deletions

View File

@ -97,6 +97,9 @@ GPS::update(void)
}
}
}
// update notify with gps status
notify.flags.gps_status = _status;
}
void

View File

@ -11,6 +11,7 @@
#include <inttypes.h>
#include <AP_Progmem.h>
#include <AP_Math.h>
#include <AP_Notify.h>
/// @class GPS
/// @brief Abstract base class for GPS receiver drivers.

View File

@ -15,9 +15,14 @@
#include <AP_HAL_Empty.h>
#include <AP_GPS.h>
#include <AP_Math.h>
#include <AP_Notify.h>
#include <AP_BoardLED.h>
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()