Skip to content
Snippets Groups Projects
Commit 134f41c7 authored by Thomas Gubler's avatar Thomas Gubler
Browse files

make ros params from launch files work

parent 3684ac6b
No related branches found
No related tags found
No related merge requests found
......@@ -81,12 +81,16 @@ typedef const char *px4_param_t;
/* Helper functions to set ROS params, only int and float supported */
static inline px4_param_t PX4_ROS_PARAM_SET(const char *name, int value)
{
ros::param::set(name, value);
if (!ros::param::has(name)) {
ros::param::set(name, value);
}
return (px4_param_t)name;
};
static inline px4_param_t PX4_ROS_PARAM_SET(const char *name, float value)
{
ros::param::set(name, value);
if (!ros::param::has(name)) {
ros::param::set(name, value);
}
return (px4_param_t)name;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment