mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 15:03:33 +08:00
Revamped debug macros
Created px4_debug,h to define: PX4_DBG PX4_INFO PX4_WARN PX4_ERR These enable OS specific mappings to be made, filtering, etc. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <px4_debug.h>
|
||||
|
||||
/* Get the name of the default value fiven the param name */
|
||||
#define PX4_PARAM_DEFAULT_VALUE_NAME(_name) PARAM_##_name##_DEFAULT
|
||||
|
||||
@@ -60,10 +63,6 @@
|
||||
/* Main entry point */
|
||||
#define PX4_MAIN_FUNCTION(_prefix) int main(int argc, char **argv)
|
||||
|
||||
/* Print/output wrappers */
|
||||
#define PX4_WARN ROS_WARN
|
||||
#define PX4_INFO ROS_INFO
|
||||
|
||||
/* Get value of parameter by name, which is equal to the handle for ros */
|
||||
#define PX4_PARAM_GET_BYNAME(_name, _destpt) ros::param::get(_name, *_destpt)
|
||||
|
||||
@@ -75,10 +74,6 @@
|
||||
/* Main entry point */
|
||||
#define PX4_MAIN_FUNCTION(_prefix) int _prefix##_task_main(int argc, char *argv[])
|
||||
|
||||
/* Print/output wrappers */
|
||||
#define PX4_WARN warnx
|
||||
#define PX4_INFO warnx
|
||||
|
||||
/* Parameter handle datatype */
|
||||
#include <systemlib/param/param.h>
|
||||
typedef param_t px4_param_t;
|
||||
|
||||
Reference in New Issue
Block a user