added SITL_debug() macro

this can be used to print a message into the logs in the SITL
simulator. This will be used for critical conditions.
This commit is contained in:
Andrew Tridgell 2012-02-14 21:05:41 +11:00
parent 7ba65aecf3
commit 7355f5613c
1 changed files with 6 additions and 0 deletions

View File

@ -227,5 +227,11 @@ struct Location {
//@} //@}
#ifdef DESKTOP_BUILD
// used to report serious errors in autotest
# define SITL_debug(fmt, args...) fprintf(stdout, "%s:%u " fmt, __FUNCTION__, __LINE__, ##args)
#else
# define SITL_debug(fmt, args...)
#endif
#endif // _AP_COMMON_H #endif // _AP_COMMON_H