From ee2e711fe30101ce5ad434790f525e21285c6ee0 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 4 Jan 2023 01:39:14 +0000 Subject: [PATCH] Rover: use shared param info defines --- Rover/Parameters.cpp | 7 +------ Rover/Parameters.h | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Rover/Parameters.cpp b/Rover/Parameters.cpp index 5a85763144..0c9777ee1f 100644 --- a/Rover/Parameters.cpp +++ b/Rover/Parameters.cpp @@ -4,11 +4,6 @@ Rover parameter definitions */ -#define GSCALAR(v, name, def) { rover.g.v.vtype, name, Parameters::k_param_ ## v, &rover.g.v, {def_value:def} } -#define GGROUP(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &rover.g.v, {group_info:class::var_info} } -#define GOBJECT(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &rover.v, {group_info:class::var_info} } -#define GOBJECTN(v, pname, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## pname, &rover.v, {group_info : class::var_info} } - const AP_Param::Info Rover::var_info[] = { // @Param: FORMAT_VERSION // @DisplayName: Eeprom format version number @@ -395,7 +390,7 @@ const AP_Param::Info Rover::var_info[] = { // @Group: // @Path: ../libraries/AP_Vehicle/AP_Vehicle.cpp - { AP_PARAM_GROUP, "", Parameters::k_param_vehicle, (const void *)&rover, {group_info : AP_Vehicle::var_info} }, + PARAM_VEHICLE_INFO, AP_VAREND }; diff --git a/Rover/Parameters.h b/Rover/Parameters.h index 313803469f..74593e1f72 100644 --- a/Rover/Parameters.h +++ b/Rover/Parameters.h @@ -16,6 +16,8 @@ #include "AP_Torqeedo/AP_Torqeedo.h" #include +#define AP_PARAM_VEHICLE_NAME rover + // Global parameter class. // class Parameters {