From 5020db4481b1dedafd0153b68edbbf54dd9e6ea0 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Mon, 19 Oct 2015 17:30:26 -0200 Subject: [PATCH] AP_Math: remove unnecessary includes Remove unnecessary includes, in particular the includes for specific boards. The list of libraries for 'polygon' example was updated so that the example compiles again. --- libraries/AP_Math/examples/eulers/eulers.cpp | 31 ----------------- .../AP_Math/examples/location/location.cpp | 31 ----------------- libraries/AP_Math/examples/polygon/make.inc | 21 ++++++++++++ .../AP_Math/examples/polygon/polygon.cpp | 8 +---- .../AP_Math/examples/rotations/rotations.cpp | 33 +------------------ 5 files changed, 23 insertions(+), 101 deletions(-) diff --git a/libraries/AP_Math/examples/eulers/eulers.cpp b/libraries/AP_Math/examples/eulers/eulers.cpp index 921932e85c..32e1360491 100644 --- a/libraries/AP_Math/examples/eulers/eulers.cpp +++ b/libraries/AP_Math/examples/eulers/eulers.cpp @@ -4,38 +4,7 @@ // #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include const AP_HAL::HAL& hal = AP_HAL::get_HAL(); diff --git a/libraries/AP_Math/examples/location/location.cpp b/libraries/AP_Math/examples/location/location.cpp index 26cc8f1394..f10554b919 100644 --- a/libraries/AP_Math/examples/location/location.cpp +++ b/libraries/AP_Math/examples/location/location.cpp @@ -3,39 +3,8 @@ // Unit tests for the AP_Math polygon code // -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include const AP_HAL::HAL& hal = AP_HAL::get_HAL(); diff --git a/libraries/AP_Math/examples/polygon/make.inc b/libraries/AP_Math/examples/polygon/make.inc index 5033b8b3fc..f667199307 100644 --- a/libraries/AP_Math/examples/polygon/make.inc +++ b/libraries/AP_Math/examples/polygon/make.inc @@ -1,5 +1,26 @@ +LIBRARIES += AP_ADC +LIBRARIES += AP_ADC_AnalogSource +LIBRARIES += AP_AHRS +LIBRARIES += AP_Airspeed +LIBRARIES += AP_Baro +LIBRARIES += AP_BattMonitor LIBRARIES += AP_Common +LIBRARIES += AP_Compass +LIBRARIES += AP_Declination +LIBRARIES += AP_GPS +LIBRARIES += AP_InertialSensor LIBRARIES += AP_Math +LIBRARIES += AP_Mission +LIBRARIES += AP_NavEKF +LIBRARIES += AP_Notify +LIBRARIES += AP_OpticalFlow LIBRARIES += AP_Param LIBRARIES += AP_Progmem +LIBRARIES += AP_Rally +LIBRARIES += AP_RangeFinder +LIBRARIES += AP_Terrain +LIBRARIES += AP_Vehicle +LIBRARIES += DataFlash +LIBRARIES += Filter +LIBRARIES += GCS_MAVLink LIBRARIES += StorageManager diff --git a/libraries/AP_Math/examples/polygon/polygon.cpp b/libraries/AP_Math/examples/polygon/polygon.cpp index ec6aa3946d..4ddd4f6298 100644 --- a/libraries/AP_Math/examples/polygon/polygon.cpp +++ b/libraries/AP_Math/examples/polygon/polygon.cpp @@ -3,14 +3,8 @@ // Unit tests for the AP_Math polygon code // -#include -#include -#include -#include -#include #include -#include -#include +#include const AP_HAL::HAL& hal = AP_HAL::get_HAL(); diff --git a/libraries/AP_Math/examples/rotations/rotations.cpp b/libraries/AP_Math/examples/rotations/rotations.cpp index 97495b8441..ae5909e02f 100644 --- a/libraries/AP_Math/examples/rotations/rotations.cpp +++ b/libraries/AP_Math/examples/rotations/rotations.cpp @@ -2,40 +2,9 @@ // // Unit tests for the AP_Math rotations code // + #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // ArduPilot Mega Declination Helper Library -#include -#include -#include -#include -#include -#include -#include -#include -#include const AP_HAL::HAL& hal = AP_HAL::get_HAL();