mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 16:49:05 +08:00
Small fixes for debug macros
Fixed print format for __LINE__ to %d Fixed if/else that breaks with the debug macro expansion. The if/else needs to use braces to allow macro expansion. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
0bf690d36a
commit
c832f4c55c
@ -227,10 +227,12 @@ void px4_task_exit(int ret)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i>=PX4_MAX_TASKS)
|
||||
if (i>=PX4_MAX_TASKS) {
|
||||
PX4_ERR("px4_task_exit: self task not found!");
|
||||
else
|
||||
}
|
||||
else {
|
||||
PX4_DBG("px4_task_exit: %s", taskmap[i].name.c_str());
|
||||
}
|
||||
|
||||
pthread_exit((void *)(unsigned long)ret);
|
||||
}
|
||||
|
||||
@ -85,9 +85,6 @@ struct wqueue_s g_work[NWORKERS];
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define USEC_TO_TICKS(x) (uint32_t)((x)/1000ull)
|
||||
#define TICKS_TO_USEC(x) ((x)*1000ull)
|
||||
|
||||
static void work_process(FAR struct wqueue_s *wqueue)
|
||||
{
|
||||
volatile FAR struct work_s *work;
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#define PX4_DBG(...)
|
||||
#define PX4_INFO(...) warnx(__VA_ARGS__)
|
||||
#define PX4_WARN(...) warnx(__VA_ARGS__)
|
||||
#define PX4_ERR(...) { warnx("ERROR %s %s:", __FILE__, __LINE__); warnx(__VA_ARGS__); }
|
||||
#define PX4_ERR(...) { warnx("ERROR file %s line %d:", __FILE__, __LINE__); warnx(__VA_ARGS__); }
|
||||
|
||||
#elif defined(__PX4_ROS)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user