From 079522547590131895cb82c5159a1c2b19e87ab5 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Sun, 20 Jun 2021 16:09:22 +0530 Subject: [PATCH] AP_RangeFinder: Use HAL_CANMANAGER_ENABLED instead of HAL_ENABLE_LIBUAVCAN_DRIVERS --- libraries/AP_RangeFinder/AP_RangeFinder.cpp | 2 +- libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.cpp | 4 ++-- libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder.cpp b/libraries/AP_RangeFinder/AP_RangeFinder.cpp index 6953e6c918..4cd9dae559 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder.cpp @@ -540,7 +540,7 @@ void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance) break; case Type::UAVCAN: -#if HAL_ENABLE_LIBUAVCAN_DRIVERS +#if HAL_CANMANAGER_ENABLED /* the UAVCAN driver gets created when we first receive a measurement. We take the instance slot now, even if we don't diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.cpp index 8c3dd2ee9b..decdbaf206 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.cpp @@ -1,6 +1,6 @@ #include -#if HAL_ENABLE_LIBUAVCAN_DRIVERS +#if HAL_CANMANAGER_ENABLED #include "AP_RangeFinder_UAVCAN.h" @@ -180,5 +180,5 @@ void AP_RangeFinder_UAVCAN::handle_measurement(AP_UAVCAN* ap_uavcan, uint8_t nod } } -#endif // HAL_ENABLE_LIBUAVCAN_DRIVERS +#endif // HAL_CANMANAGER_ENABLED diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.h b/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.h index b572fd0bbd..ec200b3962 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.h +++ b/libraries/AP_RangeFinder/AP_RangeFinder_UAVCAN.h @@ -2,7 +2,7 @@ #include "AP_RangeFinder_Backend.h" -#if HAL_ENABLE_LIBUAVCAN_DRIVERS +#if HAL_CANMANAGER_ENABLED #include class MeasurementCb; @@ -33,4 +33,4 @@ private: bool new_data; MAV_DISTANCE_SENSOR _sensor_type; }; -#endif //HAL_ENABLE_LIBUAVCAN_DRIVERS +#endif //HAL_CANMANAGER_ENABLED