mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 14:13:34 +08:00
Add interface to enabled/disable debug output
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4386 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -111,9 +111,16 @@ int lib_lowprintf(const char *fmt, ...)
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret= lib_lowvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
#ifdef CONFIG_DEBUG_ENABLE
|
||||
ret = 0;
|
||||
if (g_dbgenable)
|
||||
#endif
|
||||
{
|
||||
va_start(ap, fmt);
|
||||
ret = lib_lowvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,8 +137,15 @@ int lib_rawprintf(const char *fmt, ...)
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret= lib_rawvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
#ifdef CONFIG_DEBUG_ENABLE
|
||||
ret = 0;
|
||||
if (g_dbgenable)
|
||||
#endif
|
||||
{
|
||||
va_start(ap, fmt);
|
||||
ret = lib_rawvprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user