AP_RangeFinder: change UAVCAN_ENABLED to DRONECAN_ENABLED

This commit is contained in:
Andrew Tridgell 2023-04-08 13:58:13 +10:00
parent 9d5815ce7b
commit 7b1337adaf
3 changed files with 7 additions and 7 deletions

View File

@ -488,7 +488,7 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance)
break; break;
case Type::UAVCAN: case Type::UAVCAN:
#if AP_RANGEFINDER_UAVCAN_ENABLED #if AP_RANGEFINDER_DRONECAN_ENABLED
/* /*
the UAVCAN driver gets created when we first receive a the UAVCAN driver gets created when we first receive a
measurement. We take the instance slot now, even if we don't measurement. We take the instance slot now, even if we don't

View File

@ -1,6 +1,6 @@
#include "AP_RangeFinder_DroneCAN.h" #include "AP_RangeFinder_DroneCAN.h"
#if AP_RANGEFINDER_UAVCAN_ENABLED #if AP_RANGEFINDER_DRONECAN_ENABLED
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_CANManager/AP_CANManager.h> #include <AP_CANManager/AP_CANManager.h>
@ -161,4 +161,4 @@ void AP_RangeFinder_UAVCAN::handle_measurement(AP_DroneCAN *ap_dronecan, const C
} }
} }
#endif // AP_RANGEFINDER_UAVCAN_ENABLED #endif // AP_RANGEFINDER_DRONECAN_ENABLED

View File

@ -2,11 +2,11 @@
#include "AP_RangeFinder_Backend.h" #include "AP_RangeFinder_Backend.h"
#ifndef AP_RANGEFINDER_UAVCAN_ENABLED #ifndef AP_RANGEFINDER_DRONECAN_ENABLED
#define AP_RANGEFINDER_UAVCAN_ENABLED (HAL_ENABLE_LIBUAVCAN_DRIVERS && AP_RANGEFINDER_BACKEND_DEFAULT_ENABLED) #define AP_RANGEFINDER_DRONECAN_ENABLED (HAL_ENABLE_LIBUAVCAN_DRIVERS && AP_RANGEFINDER_BACKEND_DEFAULT_ENABLED)
#endif #endif
#if AP_RANGEFINDER_UAVCAN_ENABLED #if AP_RANGEFINDER_DRONECAN_ENABLED
#include <AP_DroneCAN/AP_DroneCAN.h> #include <AP_DroneCAN/AP_DroneCAN.h>
@ -39,4 +39,4 @@ private:
bool new_data; bool new_data;
MAV_DISTANCE_SENSOR _sensor_type; MAV_DISTANCE_SENSOR _sensor_type;
}; };
#endif // AP_RANGEFINDER_UAVCAN_ENABLED #endif // AP_RANGEFINDER_DRONECAN_ENABLED