Qurt PX4_INFO_RAW send to apps for display (#21080)

This commit is contained in:
Eric Katzfey 2023-02-07 14:22:09 -08:00 committed by GitHub
parent db24c2b233
commit ddd1527305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -71,7 +71,7 @@ __END_DECLS
* Messages that should never be filtered or compiled out
****************************************************************************/
#define PX4_INFO(FMT, ...) qurt_log(_PX4_LOG_LEVEL_INFO, __FILE__, __LINE__, FMT, ##__VA_ARGS__)
#define PX4_INFO_RAW(FMT, ...) __px4_log_omit(_PX4_LOG_LEVEL_INFO, FMT, ##__VA_ARGS__)
#define PX4_INFO_RAW(FMT, ...) qurt_log_raw(FMT, ##__VA_ARGS__)
#if defined(TRACE_BUILD)
/****************************************************************************

View File

@ -57,4 +57,14 @@ static __inline void qurt_log(int level, const char *file, int line,
qurt_log_to_apps(level, buf);
}
static __inline void qurt_log_raw(const char *format, ...)
{
char buf[256];
va_list args;
va_start(args, format);
vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
qurt_log_to_apps(1, buf);
}
__END_DECLS