mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 23:47:34 +08:00
fix param_test
This commit is contained in:
committed by
Lorenz Meier
parent
008354f935
commit
d85e7732b4
@@ -10,6 +10,8 @@ struct param_info_s param_array[256];
|
||||
struct param_info_s *param_info_base;
|
||||
struct param_info_s *param_info_limit;
|
||||
|
||||
#define param_info_count 4
|
||||
|
||||
/*
|
||||
* Adds test parameters
|
||||
*/
|
||||
@@ -44,8 +46,10 @@ void _add_parameters()
|
||||
param_array[2] = rc_x;
|
||||
param_array[3] = rc2_x;
|
||||
param_info_base = (struct param_info_s *) ¶m_array[0];
|
||||
param_info_limit = (struct param_info_s *) ¶m_array[4]; // needs to point at the end of the data,
|
||||
// therefore number of params + 1
|
||||
// needs to point at the end of the data,
|
||||
// therefore number of params + 1
|
||||
param_info_limit = (struct param_info_s *) ¶m_array[4];
|
||||
|
||||
}
|
||||
|
||||
void _assert_parameter_int_value(param_t param, int32_t expected)
|
||||
@@ -149,4 +153,4 @@ TEST(ParamTest, ResetAllExcludesWildcard)
|
||||
_assert_parameter_int_value((param_t)1, 4);
|
||||
_assert_parameter_int_value((param_t)2, 50);
|
||||
_assert_parameter_int_value((param_t)3, 50);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user