From c7871d1bcaded64aa09882df24fd0303e98cd418 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 3 Nov 2015 11:46:29 -0200 Subject: [PATCH] AP_Math: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 --- libraries/AP_Math/AP_Math.h | 3 - libraries/AP_Math/AP_Math_AVR_Compat.h | 153 ------------------------- libraries/AP_Math/location.cpp | 1 - 3 files changed, 157 deletions(-) delete mode 100644 libraries/AP_Math/AP_Math_AVR_Compat.h diff --git a/libraries/AP_Math/AP_Math.h b/libraries/AP_Math/AP_Math.h index e0e11026e2..c6604ddc7f 100644 --- a/libraries/AP_Math/AP_Math.h +++ b/libraries/AP_Math/AP_Math.h @@ -8,9 +8,6 @@ #include #include #include -#ifdef __AVR__ -# include "AP_Math_AVR_Compat.h" -#endif #include #include "rotations.h" #include "vector2.h" diff --git a/libraries/AP_Math/AP_Math_AVR_Compat.h b/libraries/AP_Math/AP_Math_AVR_Compat.h deleted file mode 100644 index 348ea88d39..0000000000 --- a/libraries/AP_Math/AP_Math_AVR_Compat.h +++ /dev/null @@ -1,153 +0,0 @@ -// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -#ifndef AP_MATH_AVR_COMPAT_H -#define AP_MATH_AVR_COMPAT_H - -// This file defines the floating-point version of standard C math -// functions on doubles, if they are not present in avr-libc. - -#ifndef cosf -# define cosf cos -#endif - -#ifndef sinf -# define sinf sin -#endif - -#ifndef tanf -# define tanf tan -#endif - -#ifndef fabsf -# define fabsf fabs -#endif - -#ifndef fmodf -# define fmodf fmod -#endif - -#ifndef sqrtf -# define sqrtf sqrt -#endif - -#ifndef cbrtf -# define cbrtf cbrt -#endif - -#ifndef hypotf -# define hypotf hypot -#endif - -#ifndef squaref -# define squaref square -#endif - -#ifndef floorf -# define floorf floor -#endif - -#ifndef ceilf -# define ceilf ceil -#endif - -#ifndef frexpf -# define frexpf frexp -#endif - -#ifndef ldexpf -# define ldexpf ldexp -#endif - -#ifndef expf -# define expf exp -#endif - -#ifndef coshf -# define coshf cosh -#endif - -#ifndef sinhf -# define sinhf sinh -#endif - -#ifndef tanhf -# define tanhf tanh -#endif - -#ifndef acosf -# define acosf acos -#endif - -#ifndef asinf -# define asinf asin -#endif - -#ifndef atanf -# define atanf atan -#endif - -#ifndef atan2f -# define atan2f atan2 -#endif - -#ifndef logf -# define logf log -#endif - -#ifndef log10f -# define log10f log10 -#endif - -#ifndef powf -# define powf pow -#endif - -#ifndef isnanf -# define isnanf isnan -#endif - -#ifndef isinff -# define isinff isinf -#endif - -#ifndef isfinitef -# define isfinitef isfinite -#endif - -#ifndef copysignf -# define copysignf copysign -#endif - -#ifndef signbitf -# define signbitf signbit -#endif - -#ifndef fdimf -# define fdimf fdim -#endif - -#ifndef fmaf -# define fmaf fma -#endif - -#ifndef fminf -# define fminf fmin -#endif - -#ifndef truncf -# define truncf trunc -#endif - -#ifndef roundf -# define roundf round -#endif - -#ifndef lroundf -# define lroundf lround -#endif - -#ifndef lrintf -# define lrintf lrint -#endif - -#endif // !defined AP_MATH_AVR_COMPAT_H diff --git a/libraries/AP_Math/location.cpp b/libraries/AP_Math/location.cpp index fa8aa9d1c5..6130cb0990 100644 --- a/libraries/AP_Math/location.cpp +++ b/libraries/AP_Math/location.cpp @@ -127,7 +127,6 @@ void location_update(struct Location &loc, float bearing, float distance) /* * extrapolate latitude/longitude given distances north and east - * This function costs about 80 usec on an AVR2560 */ void location_offset(struct Location &loc, float ofs_north, float ofs_east) {