diff --git a/src/lib/controllib/controllib_test/CMakeLists.txt b/src/lib/controllib/controllib_test/CMakeLists.txt index 0d57d54cc1..87333294b6 100644 --- a/src/lib/controllib/controllib_test/CMakeLists.txt +++ b/src/lib/controllib/controllib_test/CMakeLists.txt @@ -38,5 +38,7 @@ px4_add_module( -Wno-double-promotion # TODO: fix in Matrix library Vector::pow() SRCS controllib_test_main.cpp + MODULE_CONFIG + test_params.yaml DEPENDS ) diff --git a/src/lib/controllib/controllib_test/test_params.c b/src/lib/controllib/controllib_test/test_params.c deleted file mode 100644 index bfaa19636b..0000000000 --- a/src/lib/controllib/controllib_test/test_params.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -// WARNING: -// do not changes these unless -// you want to recompute the -// answers for all of the unit tests - - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_MIN, -1.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_MAX, 1.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_TRIM, 0.5f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_HP, 10.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_LP, 10.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_P, 0.2f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_I, 0.1f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_I_MAX, 1.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_D, 0.01f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_D_LP, 10.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_MEAN, 1.0f); - -/** - * @group Testing - */ -PARAM_DEFINE_FLOAT(TEST_DEV, 2.0f); diff --git a/src/lib/controllib/controllib_test/test_params.yaml b/src/lib/controllib/controllib_test/test_params.yaml new file mode 100644 index 0000000000..8e96f358b7 --- /dev/null +++ b/src/lib/controllib/controllib_test/test_params.yaml @@ -0,0 +1,64 @@ +module_name: controllib_test +parameters: +- group: Testing + definitions: + TEST_MIN: + description: + short: TEST_MIN + type: float + default: -1.0 + TEST_MAX: + description: + short: TEST_MAX + type: float + default: 1.0 + TEST_TRIM: + description: + short: TEST_TRIM + type: float + default: 0.5 + TEST_HP: + description: + short: TEST_HP + type: float + default: 10.0 + TEST_LP: + description: + short: TEST_LP + type: float + default: 10.0 + TEST_P: + description: + short: TEST_P + type: float + default: 0.2 + TEST_I: + description: + short: TEST_I + type: float + default: 0.1 + TEST_I_MAX: + description: + short: TEST_I_MAX + type: float + default: 1.0 + TEST_D: + description: + short: TEST_D + type: float + default: 0.01 + TEST_D_LP: + description: + short: TEST_D_LP + type: float + default: 10.0 + TEST_MEAN: + description: + short: TEST_MEAN + type: float + default: 1.0 + TEST_DEV: + description: + short: TEST_DEV + type: float + default: 2.0