add parameter wrapper macros for ros

This commit is contained in:
Thomas Gubler
2014-12-03 12:31:37 +01:00
parent 905913986a
commit 6a99b04fb7
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -74,6 +74,14 @@ PX4_MAIN_FUNCTION(subscriber) {
*/
px4::NodeHandle n;
/* Define a parameter */
PX4_PARAM_INIT("SUB_INTERV", 100);
/* Read the parameter back for testing */
int32_t sub_interval;
PX4_PARAM_GET("SUB_INTERV", &sub_interval);
PX4_INFO("Param SUB_INTERV = %d", sub_interval);
/**
* The subscribe() call is how you tell ROS that you want to receive messages
* on a given topic. This invokes a call to the ROS