diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 65131d2c66..7c87fc6d3a 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -170,10 +170,6 @@ private: AP_Baro barometer; Compass compass; -#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 - AP_ADC_ADS7844 apm1_adc; -#endif - AP_InertialSensor ins; // Inertial Navigation EKF diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index 39eb302101..8313962f8b 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -76,6 +76,10 @@ static void failsafe_check_static() plane.failsafe_check(); } +#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 +AP_ADC_ADS7844 apm1_adc; +#endif + void Plane::init_ardupilot() { // initialise serial port