From 405334602230a4d7c0cb1f9b8eb4f43278342598 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Thu, 8 Nov 2012 00:08:18 +0900 Subject: [PATCH] AP_AHRS: fix example sketch AP_Airspeed: fix example sketch AP_Baro: fix example sketch AP_Declination: fix example sketch AP_Math: fix example sketch --- libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.pde | 13 +++++-------- .../AP_Airspeed/examples/Airspeed/Airspeed.pde | 1 + .../AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde | 1 + .../AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde | 1 + .../AP_Declination_test/AP_Declination_test.pde | 2 ++ libraries/AP_Math/examples/eulers/eulers.pde | 1 + libraries/AP_Math/examples/location/location.pde | 1 + libraries/AP_Math/examples/rotations/rotations.pde | 1 + 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.pde b/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.pde index e66e13e1be..7807f5fd53 100644 --- a/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.pde +++ b/libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.pde @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include // uncomment this for a APM2 board #define APM2_HARDWARE @@ -55,12 +55,9 @@ static GPS *g_gps; AP_GPS_Auto g_gps_driver(&Serial1, &g_gps); -AP_IMU_INS imu(&ins); - // choose which AHRS system to use -AP_AHRS_DCM ahrs(&imu, g_gps); -//AP_AHRS_Quaternion ahrs(&imu, g_gps); -//AP_AHRS_MPU6000 ahrs(&imu, g_gps, &ins); // only works with APM2 +AP_AHRS_DCM ahrs(&ins, g_gps); +//AP_AHRS_MPU6000 ahrs(&ins, g_gps); // only works with APM2 AP_Baro_BMP085_HIL barometer; @@ -109,8 +106,8 @@ void setup(void) isr_registry.init(); scheduler.init(&isr_registry); - imu.init(IMU::COLD_START, delay, flash_leds, &scheduler); - imu.init_accel(delay, flash_leds); + ins.init(AP_InertialSensor::COLD_START, delay, flash_leds, &scheduler); + ins.init_accel(delay, flash_leds); compass.set_orientation(MAG_ORIENTATION); ahrs.init(); diff --git a/libraries/AP_Airspeed/examples/Airspeed/Airspeed.pde b/libraries/AP_Airspeed/examples/Airspeed/Airspeed.pde index d6ec9e0638..57af9bbb96 100644 --- a/libraries/AP_Airspeed/examples/Airspeed/Airspeed.pde +++ b/libraries/AP_Airspeed/examples/Airspeed/Airspeed.pde @@ -16,6 +16,7 @@ #include #include #include +#include #include Arduino_Mega_ISR_Registry isr_registry; diff --git a/libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde b/libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde index 35beef5076..314cec4959 100644 --- a/libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde +++ b/libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde @@ -13,6 +13,7 @@ #include #include #include +#include #ifndef APM2_HARDWARE # define APM2_HARDWARE 0 diff --git a/libraries/AP_Baro/examples/AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde b/libraries/AP_Baro/examples/AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde index 8f1ecc13f2..a26e8c8b67 100644 --- a/libraries/AP_Baro/examples/AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde +++ b/libraries/AP_Baro/examples/AP_Baro_MS5611_test/AP_Baro_MS5611_test.pde @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include // ArduPilot Mega ADC Library diff --git a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde index ccbea38496..3ecebe18d1 100644 --- a/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde +++ b/libraries/AP_Declination/examples/AP_Declination_test/AP_Declination_test.pde @@ -6,12 +6,14 @@ #include #include #include +#include #include #include #ifdef DESKTOP_BUILD // all of this is needed to build with SITL #include + #include #include #include #include diff --git a/libraries/AP_Math/examples/eulers/eulers.pde b/libraries/AP_Math/examples/eulers/eulers.pde index f16ab6b0cc..7150fcb781 100644 --- a/libraries/AP_Math/examples/eulers/eulers.pde +++ b/libraries/AP_Math/examples/eulers/eulers.pde @@ -25,6 +25,7 @@ FastSerialPort(Serial, 0); #include #include #include + #include #include Arduino_Mega_ISR_Registry isr_registry; AP_Baro_BMP085_HIL barometer; diff --git a/libraries/AP_Math/examples/location/location.pde b/libraries/AP_Math/examples/location/location.pde index 0da9c9d629..44a13b561c 100644 --- a/libraries/AP_Math/examples/location/location.pde +++ b/libraries/AP_Math/examples/location/location.pde @@ -23,6 +23,7 @@ #include #include #include + #include #include Arduino_Mega_ISR_Registry isr_registry; AP_Baro_BMP085_HIL barometer; diff --git a/libraries/AP_Math/examples/rotations/rotations.pde b/libraries/AP_Math/examples/rotations/rotations.pde index ee19e6f922..54848939a5 100644 --- a/libraries/AP_Math/examples/rotations/rotations.pde +++ b/libraries/AP_Math/examples/rotations/rotations.pde @@ -25,6 +25,7 @@ FastSerialPort(Serial, 0); #include // ArduPilot Mega Declination Helper Library #include #include + #include #include Arduino_Mega_ISR_Registry isr_registry; AP_Baro_BMP085_HIL barometer;