Browse Source

mavlink_log: add mavlink_log_warning

sbg
Beat Küng 6 years ago committed by Daniel Agar
parent
commit
af07497b21
  1. 12
      src/modules/systemlib/mavlink_log.h

12
src/modules/systemlib/mavlink_log.h

@ -80,6 +80,18 @@ __EXPORT void mavlink_vasprintf(int severity, orb_advert_t *mavlink_log_pub, con @@ -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.
*

Loading…
Cancel
Save