From 4054b5e891b921e7c3130de4f1fa511e427c62df Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Wed, 19 May 2021 00:30:52 -0700 Subject: [PATCH] AP_HAL_Linux: AP::can().log_text() needs HAL_ENABLE_LIBUAVCAN_DRIVERS --- libraries/AP_HAL_Linux/CANSocketIface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL_Linux/CANSocketIface.cpp b/libraries/AP_HAL_Linux/CANSocketIface.cpp index ca8d3627cb..d21bf6ddde 100644 --- a/libraries/AP_HAL_Linux/CANSocketIface.cpp +++ b/libraries/AP_HAL_Linux/CANSocketIface.cpp @@ -45,7 +45,11 @@ extern const AP_HAL::HAL& hal; using namespace Linux; +#if HAL_ENABLE_LIBUAVCAN_DRIVERS #define Debug(fmt, args...) do { AP::can().log_text(AP_CANManager::LOG_DEBUG, "CANLinuxIface", fmt, ##args); } while (0) +#else +#define Debug(fmt, args...) +#endif CANIface::CANSocketEventSource CANIface::evt_can_socket[HAL_NUM_CAN_IFACES];