From 7f488c1c9c65061d1244b38c22c547ec20c95d6c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 May 2015 08:51:28 +1000 Subject: [PATCH] Plane: removed duplicate rangefinder instance --- ArduPlane/ArduPlane.pde | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index 50b4fa2af2..baedcc3938 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -191,7 +191,6 @@ static int32_t pitch_limit_min_cd; // GPS driver static AP_GPS gps; -static RangeFinder rng; // flight modes convenience array static AP_Int8 *flight_modes = &g.flight_mode1; @@ -206,9 +205,11 @@ AP_ADC_ADS7844 apm1_adc; AP_InertialSensor ins; +static RangeFinder rangefinder; + // Inertial Navigation EKF #if AP_AHRS_NAVEKF_AVAILABLE -AP_AHRS_NavEKF ahrs(ins, barometer, gps, rng); +AP_AHRS_NavEKF ahrs(ins, barometer, gps, rangefinder); #else AP_AHRS_DCM ahrs(ins, barometer, gps); #endif @@ -268,11 +269,6 @@ static AP_SpdHgtControl *SpdHgt_Controller = &TECS_controller; // a pin for reading the receiver RSSI voltage. static AP_HAL::AnalogSource *rssi_analog_source; -//////////////////////////////////////////////////////////////////////////////// -// rangefinder -//////////////////////////////////////////////////////////////////////////////// -static RangeFinder rangefinder; - static struct { bool in_range; float correction;