mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:33:34 +08:00
Reduces wasted FLASH by > 4K (#4994)
* Reduces wasted FLASH by > 4K * Removed PX4_IMPLEMENT_PX4_LOG_MODULENAME * Moved implamentation of px4_log_modulename to px4_log.c
This commit is contained in:
committed by
Lorenz Meier
parent
056f73f5d2
commit
1d5c5497b5
@@ -30,3 +30,21 @@ void px4_backtrace()
|
||||
free(callstack);
|
||||
#endif
|
||||
}
|
||||
|
||||
__EXPORT void px4_log_modulename(int level, const char *moduleName, const char *fmt, ...)
|
||||
{
|
||||
if (level <= __px4_log_level_current) {
|
||||
PX4_LOG_COLOR_START
|
||||
printf(__px4__log_level_fmt __px4__log_level_arg(level));
|
||||
PX4_LOG_COLOR_MODULE
|
||||
printf(__px4__log_modulename_pfmt, moduleName);
|
||||
PX4_LOG_COLOR_MESSAGE
|
||||
va_list argptr;
|
||||
va_start(argptr, fmt);
|
||||
vprintf(fmt, argptr);
|
||||
va_end(argptr);
|
||||
PX4_LOG_COLOR_END
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user