diff --git a/libraries/AP_KDECAN/AP_KDECAN.cpp b/libraries/AP_KDECAN/AP_KDECAN.cpp index f00a752777..48e1cd3f0c 100644 --- a/libraries/AP_KDECAN/AP_KDECAN.cpp +++ b/libraries/AP_KDECAN/AP_KDECAN.cpp @@ -35,7 +35,11 @@ #if HAL_MAX_CAN_PROTOCOL_DRIVERS extern const AP_HAL::HAL& hal; +#if HAL_ENABLE_LIBUAVCAN_DRIVERS #define debug_can(level_debug, fmt, args...) do { AP::can().log_text(level_debug, "KDECAN", fmt, ##args); } while (0) +#else +#define debug_can(level_debug, fmt, args...) +#endif #define DEFAULT_NUM_POLES 14