mavlink_log: add mavlink_log_warning

This commit is contained in:
Beat Küng
2018-09-28 11:29:44 +02:00
committed by Daniel Agar
parent ee928c20f0
commit af07497b21
+12
View File
@@ -80,6 +80,18 @@ __EXPORT void mavlink_vasprintf(int severity, orb_advert_t *mavlink_log_pub, con
*/
#define mavlink_log_info(_pub, _text, ...) mavlink_vasprintf(_MSG_PRIO_INFO, _pub, _text, ##__VA_ARGS__);
/**
* Send a mavlink warning message and print to console.
*
* @param _pub Pointer to the uORB advert;
* @param _text The text to log;
*/
#define mavlink_log_warning(_pub, _text, ...) \
do { \
mavlink_vasprintf(_MSG_PRIO_WARNING, _pub, _text, ##__VA_ARGS__); \
PX4_WARN(_text, ##__VA_ARGS__); \
} while(0);
/**
* Send a mavlink emergency message and print to console.
*