forked from Archive/PX4-Autopilot
better support for param default values on ros and px4
This commit is contained in:
parent
c2e2b3d52f
commit
83d97fd1c2
|
@ -46,11 +46,11 @@
|
|||
*
|
||||
* @group Subscriber Example
|
||||
*/
|
||||
PARAM_DEFINE_INT32(SUB_INTERV, PX4_PARAM_DEFAULT_VALUE_NAME(SUB_INTERV));
|
||||
PX4_PARAM_DEFINE_INT32(SUB_INTERV);
|
||||
|
||||
/**
|
||||
* Float Demonstration Parameter in the Example
|
||||
*
|
||||
* @group Subscriber Example
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(SUB_TESTF, PX4_PARAM_DEFAULT_VALUE_NAME(SUB_TESTF));
|
||||
PX4_PARAM_DEFINE_FLOAT(SUB_TESTF);
|
||||
|
|
|
@ -39,5 +39,5 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#define SUB_INTERV_DEFAULT_VALUE 100
|
||||
#define SUB_TESTF_DEFAULT_VALUE 3.14f
|
||||
#define PARAM_SUB_INTERV_DEFAULT 100
|
||||
#define PARAM_SUB_TESTF_DEFAULT 3.14f
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define PX4_PARAM_DEFAULT_VALUE_NAME(_name) _name##_DEFAULT_VALUE
|
||||
#define PX4_PARAM_DEFAULT_VALUE_NAME(_name) PARAM_##_name##_DEFAULT
|
||||
#define PX4_PARAM_DEFINE_INT32(_name) PARAM_DEFINE_INT32(_name, PX4_PARAM_DEFAULT_VALUE_NAME(_name))
|
||||
#define PX4_PARAM_DEFINE_FLOAT(_name) PARAM_DEFINE_FLOAT(_name, PX4_PARAM_DEFAULT_VALUE_NAME(_name))
|
||||
|
||||
|
||||
#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__))
|
||||
|
|
Loading…
Reference in New Issue