aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/px4_defines.h
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-17 16:31:40 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-12-17 16:31:40 +0100
commit4402d7106bc63b2a02a1e4c22f54e072b3c48fc7 (patch)
treec1597cba369d070c9cf03a60bb58a25b59acf613 /src/platforms/px4_defines.h
parent0a1e94d504b38d30c2d7428300c5728798db094d (diff)
downloadpx4-firmware-4402d7106bc63b2a02a1e4c22f54e072b3c48fc7.tar.gz
px4-firmware-4402d7106bc63b2a02a1e4c22f54e072b3c48fc7.tar.bz2
px4-firmware-4402d7106bc63b2a02a1e4c22f54e072b3c48fc7.zip
improve and fix multiplatform param by name macro
Diffstat (limited to 'src/platforms/px4_defines.h')
-rw-r--r--src/platforms/px4_defines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h
index 188149008..c1a0782c4 100644
--- a/src/platforms/px4_defines.h
+++ b/src/platforms/px4_defines.h
@@ -97,7 +97,7 @@ static inline px4_param_t PX4_ROS_PARAM_SET(const char *name, float value)
#define PX4_PARAM_GET(_handle, _destpt) ros::param::get(_handle, *_destpt)
/* Get value of parameter by name, which is equal to the handle for ros */
-#define PX4_PARAM_GET_NAME(_name, _destpt) PX4_PARAM_GET(_name, _destpt)
+#define PX4_PARAM_GET_BYNAME(_name, _destpt) PX4_PARAM_GET(_name, _destpt)
#define OK 0
#define ERROR -1
@@ -170,7 +170,7 @@ typedef param_t px4_param_t;
#define PX4_PARAM_GET(_handle, _destpt) param_get(_handle, _destpt)
/* Get value of parameter by name */
-#define PX4_PARAM_GET_NAME(_name, _destpt) param_get(PX4_PARAM_INIT(_name), _destpt)
+#define PX4_PARAM_GET_BYNAME(_name, _destpt) param_get(param_find(_name), _destpt)
/* XXX this is a hack to resolve conflicts with NuttX headers */
#define isspace(c) \