diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/subscriber/subscriber_params.c | 4 | ||||
-rw-r--r-- | src/examples/subscriber/subscriber_params.h | 4 | ||||
-rw-r--r-- | src/platforms/px4_defines.h | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/examples/subscriber/subscriber_params.c b/src/examples/subscriber/subscriber_params.c index 0d36f5021..a43817b5b 100644 --- a/src/examples/subscriber/subscriber_params.c +++ b/src/examples/subscriber/subscriber_params.c @@ -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); diff --git a/src/examples/subscriber/subscriber_params.h b/src/examples/subscriber/subscriber_params.h index 3f3ff5bce..f6f1d6ba0 100644 --- a/src/examples/subscriber/subscriber_params.h +++ b/src/examples/subscriber/subscriber_params.h @@ -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 diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h index 6760f57ea..09338acab 100644 --- a/src/platforms/px4_defines.h +++ b/src/platforms/px4_defines.h @@ -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__)) |