From 5e4efe9f5709d1883ab9407a2c458f6d048ac836 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Wed, 19 May 2021 00:31:33 -0700 Subject: [PATCH] AP_ToshibaCAN: AP::can().log_text() needs HAL_ENABLE_LIBUAVCAN_DRIVERS --- libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp b/libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp index 1bbe35deb8..fd416bedf3 100644 --- a/libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp +++ b/libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp @@ -31,8 +31,11 @@ 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, "ToshibaCAN", fmt, #args); } while (0) - +#else +#define debug_can(level_debug, fmt, args...) +#endif // stupid compiler is not able to optimise this under gnu++11 // move this back when moving to gnu++17