mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 10:47:35 +08:00
mavlink_log: add mavlink_log_warning
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user