Tools: AP_Periph: use shared Param info defines

This commit is contained in:
Iampete1 2023-01-10 12:29:23 +00:00 committed by Andrew Tridgell
parent ee2e711fe3
commit 43e5ea43b7
2 changed files with 2 additions and 7 deletions

View File

@ -62,13 +62,6 @@ extern const AP_HAL::HAL &hal;
*
*/
#define GSCALAR(v, name, def) { periph.g.v.vtype, name, Parameters::k_param_ ## v, &periph.g.v, {def_value : def} }
#define GARRAY(v, index, name, def) { periph.g.v[index].vtype, name, Parameters::k_param_ ## v ## index, &periph.g.v[index], {def_value : def} }
#define ASCALAR(v, name, def) { periph.aparm.v.vtype, name, Parameters::k_param_ ## v, (const void *)&periph.aparm.v, {def_value : def} }
#define GGROUP(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &periph.g.v, {group_info : class::var_info} }
#define GOBJECT(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, (const void *)&periph.v, {group_info : class::var_info} }
#define GOBJECTN(v, pname, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## pname, (const void *)&periph.v, {group_info : class::var_info} }
const AP_Param::Info AP_Periph_FW::var_info[] = {
// @Param: FORMAT_VERSION
// @DisplayName: Eeprom format version number

View File

@ -3,6 +3,8 @@
#include <AP_Common/AP_Common.h>
#include "GCS_MAVLink.h"
#define AP_PARAM_VEHICLE_NAME periph
// Global parameter class.
//
class Parameters {