diff --git a/ArduCopter/system.cpp b/ArduCopter/system.cpp index 669b646fe5..221a92bb9a 100644 --- a/ArduCopter/system.cpp +++ b/ArduCopter/system.cpp @@ -153,8 +153,10 @@ void Copter::init_ardupilot() barometer.set_log_baro_bit(MASK_LOG_IMU); barometer.calibrate(); +#if RANGEFINDER_ENABLED == ENABLED // initialise rangefinder init_rangefinder(); +#endif #if HAL_PROXIMITY_ENABLED // init proximity sensor