From a7bd3d1c5492daac29a7adb54e8163ac7b8f128f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 11 Aug 2015 16:47:56 +1000 Subject: [PATCH] AP_InertialSensor: removed AVR1280 specific ifdef --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 6 ------ libraries/AP_InertialSensor/AP_InertialSensor.h | 4 ---- .../AP_InertialSensor/examples/INS_generic/INS_generic.cpp | 4 ---- 3 files changed, 14 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 3b1b18bc73..f2f747c349 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -450,7 +450,6 @@ bool AP_InertialSensor::_calculate_trim(const Vector3f &accel_sample, float& tri return true; } -#if !defined( __AVR_ATmega1280__ ) // calibrate_accel - perform accelerometer calibration including providing user // instructions and feedback Gauss-Newton accel calibration routines borrowed // from Rolfe Schmidt blog post describing the method: @@ -635,7 +634,6 @@ failed: _calibrating = false; return false; } -#endif void AP_InertialSensor::init_gyro() @@ -921,8 +919,6 @@ AP_InertialSensor::_init_gyro() AP_Notify::flags.initialising = false; } -#if !defined( __AVR_ATmega1280__ ) - /* check that the samples used for accel calibration have a sufficient range on each axis. The sphere fit in _calibrate_accel() can produce @@ -1122,8 +1118,6 @@ void AP_InertialSensor::_calibrate_find_delta(float dS[6], float JS[6][6], float } } -#endif // __AVR_ATmega1280__ - // save parameters to eeprom void AP_InertialSensor::_save_parameters() { diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.h b/libraries/AP_InertialSensor/AP_InertialSensor.h index 99049dd86a..6171267231 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor.h @@ -87,13 +87,11 @@ public: uint8_t register_gyro(void); uint8_t register_accel(void); -#if !defined( __AVR_ATmega1280__ ) // perform accelerometer calibration including providing user instructions // and feedback bool calibrate_accel(AP_InertialSensor_UserInteract *interact, float& trim_roll, float& trim_pitch); -#endif bool calibrate_trim(float &trim_roll, float &trim_pitch); /// calibrating - returns true if the gyros or accels are currently being calibrated @@ -242,7 +240,6 @@ private: // gyro initialisation void _init_gyro(); -#if !defined( __AVR_ATmega1280__ ) // Calibration routines borrowed from Rolfe Schmidt // blog post describing the method: http://chionophilous.wordpress.com/2011/10/24/accelerometer-calibration-iv-1-implementing-gauss-newton-on-an-atmega/ // original sketch available at http://rolfeschmidt.com/mathtools/skimetrics/adxl_gn_calibration.pde @@ -259,7 +256,6 @@ private: void _calibrate_reset_matrices(float dS[6], float JS[6][6]); void _calibrate_find_delta(float dS[6], float JS[6][6], float delta[6]); bool _calculate_trim(const Vector3f &accel_sample, float& trim_roll, float& trim_pitch); -#endif // save parameters to eeprom void _save_parameters(); diff --git a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp index ef3716ed62..96bd75e4d3 100644 --- a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp +++ b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp @@ -121,12 +121,8 @@ static void run_calibration() } -#if !defined( __AVR_ATmega1280__ ) AP_InertialSensor_UserInteractStream interact(hal.console); ins.calibrate_accel(&interact, roll_trim, pitch_trim); -#else - hal.console->println_P(PSTR("calibrate_accel not available on 1280")); -#endif } static void display_offsets_and_scaling()