From 15a39c1649d5bdda082273cdfc9a51131a6ad47d Mon Sep 17 00:00:00 2001 From: murata Date: Mon, 21 Mar 2022 18:34:45 +0900 Subject: [PATCH] AL_HAL: Console output can be disabled --- libraries/AP_HAL/HAL.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_HAL/HAL.h b/libraries/AP_HAL/HAL.h index 7b0887fbe7..d2a6815c1b 100644 --- a/libraries/AP_HAL/HAL.h +++ b/libraries/AP_HAL/HAL.h @@ -154,4 +154,11 @@ public: #if AP_SIM_ENABLED && CONFIG_HAL_BOARD != HAL_BOARD_SITL AP_HAL::SIMState *simstate; #endif + +#ifndef HAL_CONSOLE_DISABLED +# define DEV_PRINTF(fmt, args ...) do { hal.console->printf(fmt, ## args); } while(0) +#else +# define DEV_PRINTF(fmt, args ...) +#endif + };