diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 06b5f9a452..6495c3413c 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -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 diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index b62b434fbb..3cc7ab2c2b 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/Parameters.h @@ -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[]; diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index 33df4e7eea..65c58af371 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -109,6 +109,7 @@ private: // all settable parameters Parameters g; + ParametersG2 g2; // main loop scheduler AP_Scheduler scheduler;