forked from Archive/PX4-Autopilot
px4_log: flush each line
Without this fix all PX4 output is buffered and presented at the very end of a scripted MAVSDK test which makes the log hard to read.
This commit is contained in:
parent
76750fc8a6
commit
1cb706c411
|
@ -136,6 +136,12 @@ __EXPORT void px4_log_modulename(int level, const char *moduleName, const char *
|
|||
|
||||
orb_publish(ORB_ID(log_message), orb_log_message_pub, &log_message);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4_SITL
|
||||
// Without flushing it's tricky to see stdout output when PX4 is started by
|
||||
// a script like for the MAVSDK tests.
|
||||
fflush(out);
|
||||
#endif
|
||||
}
|
||||
|
||||
__EXPORT void px4_log_raw(int level, const char *fmt, ...)
|
||||
|
|
Loading…
Reference in New Issue