mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 14:51:37 +08:00
POSIX: Fixed orb_advertise failure
There were an insufficient number of devmap entries allocated and when they ran out, new orb_advertise requests would fail. Also added a new logging macro for the Linux build to show the calling pthread if enabled. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -50,19 +50,24 @@
|
||||
printf(__VA_ARGS__);\
|
||||
printf(" (file %s line %d)\n", __FILE__, __LINE__);\
|
||||
}
|
||||
|
||||
#if defined(__PX4_QURT)
|
||||
#include <stdio.h>
|
||||
|
||||
#define PX4_DEBUG(...) __px4_log_omit("DEBUG", __VA_ARGS__);
|
||||
#define PX4_DEBUG(...) __px4_log_verbose("DEBUG", __VA_ARGS__);
|
||||
#define PX4_INFO(...) __px4_log("INFO", __VA_ARGS__);
|
||||
#define PX4_WARN(...) __px4_log_verbose("WARN", __VA_ARGS__);
|
||||
#define PX4_ERR(...) __px4_log_verbose("ERROR", __VA_ARGS__);
|
||||
|
||||
#elif defined(__PX4_LINUX)
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define __px4_log_threads(level, ...) { \
|
||||
printf("%-5s %ld ", level, pthread_self());\
|
||||
printf(__VA_ARGS__);\
|
||||
printf(" (file %s line %d)\n", __FILE__, __LINE__);\
|
||||
}
|
||||
|
||||
//#define PX4_DEBUG(...) { }
|
||||
#define PX4_DEBUG(...) __px4_log_omit("DEBUG", __VA_ARGS__);
|
||||
#define PX4_INFO(...) __px4_log("INFO", __VA_ARGS__);
|
||||
#define PX4_WARN(...) __px4_log_verbose("WARN", __VA_ARGS__);
|
||||
|
||||
Reference in New Issue
Block a user