Copter: The preprocessor determines whether rangefinder initialization is possible

This commit is contained in:
muramura 2023-08-02 07:26:17 +09:00 committed by Peter Barker
parent 380a1fe738
commit 79a59d2739

View File

@ -153,8 +153,10 @@ void Copter::init_ardupilot()
barometer.set_log_baro_bit(MASK_LOG_IMU); barometer.set_log_baro_bit(MASK_LOG_IMU);
barometer.calibrate(); barometer.calibrate();
#if RANGEFINDER_ENABLED == ENABLED
// initialise rangefinder // initialise rangefinder
init_rangefinder(); init_rangefinder();
#endif
#if HAL_PROXIMITY_ENABLED #if HAL_PROXIMITY_ENABLED
// init proximity sensor // init proximity sensor