From 79a59d2739eaa5da79fc05d9055db7820a98638d Mon Sep 17 00:00:00 2001 From: muramura Date: Wed, 2 Aug 2023 07:26:17 +0900 Subject: [PATCH] Copter: The preprocessor determines whether rangefinder initialization is possible --- ArduCopter/system.cpp | 2 ++ 1 file changed, 2 insertions(+) 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