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:
Mark Charlebois
2015-04-27 21:58:54 -07:00
parent 6ab25ae890
commit 09718fa324
10 changed files with 325 additions and 221 deletions
+3 -8
View File
@@ -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;