Rover: add support for ParametersG2
This commit is contained in:
parent
98ae6c776a
commit
cfee3b6c0e
@ -553,10 +553,24 @@ const AP_Param::Info Rover::var_info[] = {
|
|||||||
// @Group: BTN_
|
// @Group: BTN_
|
||||||
// @Path: ../libraries/AP_Button/AP_Button.cpp
|
// @Path: ../libraries/AP_Button/AP_Button.cpp
|
||||||
GOBJECT(button, "BTN_", AP_Button),
|
GOBJECT(button, "BTN_", AP_Button),
|
||||||
|
|
||||||
|
// @Group:
|
||||||
|
// @Path: Parameters.cpp
|
||||||
|
GOBJECT(g2, "", ParametersG2),
|
||||||
|
|
||||||
AP_VAREND
|
AP_VAREND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
2nd group of parameters
|
||||||
|
*/
|
||||||
|
const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
||||||
|
|
||||||
|
AP_GROUPEND
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is a conversion table from old parameter values to new
|
This is a conversion table from old parameter values to new
|
||||||
parameter names. The startup code looks for saved values of the old
|
parameter names. The startup code looks for saved values of the old
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
k_param_mission, // mission library
|
k_param_mission, // mission library
|
||||||
k_param_NavEKF2_old, // deprecated
|
k_param_NavEKF2_old, // deprecated
|
||||||
k_param_NavEKF2,
|
k_param_NavEKF2,
|
||||||
|
k_param_g2, // 2nd block of parameters
|
||||||
|
|
||||||
// 140: battery controls
|
// 140: battery controls
|
||||||
k_param_battery_monitoring = 140, // deprecated, can be deleted
|
k_param_battery_monitoring = 140, // deprecated, can be deleted
|
||||||
@ -320,4 +321,17 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
2nd block of parameters, to avoid going past 256 top level keys
|
||||||
|
*/
|
||||||
|
class ParametersG2 {
|
||||||
|
public:
|
||||||
|
ParametersG2(void) { AP_Param::setup_object_defaults(this, var_info); }
|
||||||
|
|
||||||
|
// var_info for holding Parameter information
|
||||||
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
extern const AP_Param::Info var_info[];
|
extern const AP_Param::Info var_info[];
|
||||||
|
@ -109,6 +109,7 @@ private:
|
|||||||
|
|
||||||
// all settable parameters
|
// all settable parameters
|
||||||
Parameters g;
|
Parameters g;
|
||||||
|
ParametersG2 g2;
|
||||||
|
|
||||||
// main loop scheduler
|
// main loop scheduler
|
||||||
AP_Scheduler scheduler;
|
AP_Scheduler scheduler;
|
||||||
|
Loading…
Reference in New Issue
Block a user