AP_ToshibaCAN: AP::can().log_text() needs HAL_ENABLE_LIBUAVCAN_DRIVERS

This commit is contained in:
Tom Pittenger 2021-05-19 00:31:33 -07:00 committed by Andrew Tridgell
parent 96055e877b
commit 5e4efe9f57
1 changed files with 4 additions and 1 deletions

View File

@ -31,8 +31,11 @@
extern const AP_HAL::HAL& hal; 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) #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 // stupid compiler is not able to optimise this under gnu++11
// move this back when moving to gnu++17 // move this back when moving to gnu++17