Rover: add support for ParametersG2

This commit is contained in:
Peter Barker 2016-10-26 12:37:08 +11:00 committed by Randy Mackay
parent 98ae6c776a
commit cfee3b6c0e
3 changed files with 30 additions and 1 deletions

View File

@ -553,10 +553,24 @@ const AP_Param::Info Rover::var_info[] = {
// @Group: BTN_
// @Path: ../libraries/AP_Button/AP_Button.cpp
GOBJECT(button, "BTN_", AP_Button),
// @Group:
// @Path: Parameters.cpp
GOBJECT(g2, "", ParametersG2),
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
parameter names. The startup code looks for saved values of the old

View File

@ -85,6 +85,7 @@ public:
k_param_mission, // mission library
k_param_NavEKF2_old, // deprecated
k_param_NavEKF2,
k_param_g2, // 2nd block of parameters
// 140: battery controls
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[];

View File

@ -109,6 +109,7 @@ private:
// all settable parameters
Parameters g;
ParametersG2 g2;
// main loop scheduler
AP_Scheduler scheduler;