mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
refactor(lib/controllib/controllib_test): convert params.c to module.yaml
Convert 1 parameter file(s) from legacy C format to YAML module configuration.
This commit is contained in:
parent
3b854736ca
commit
1d16b8f8ba
@ -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
|
||||
)
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
#include <parameters/param.h>
|
||||
// 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);
|
||||
64
src/lib/controllib/controllib_test/test_params.yaml
Normal file
64
src/lib/controllib/controllib_test/test_params.yaml
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user