ArduSub: use shared param info defines

This commit is contained in:
Iampete1 2023-01-04 01:39:14 +00:00 committed by Andrew Tridgell
parent 4e00a460fb
commit 30ba68e5c7
2 changed files with 3 additions and 7 deletions

View File

@ -20,12 +20,6 @@
*
*/
#define GSCALAR(v, name, def) { sub.g.v.vtype, name, Parameters::k_param_ ## v, &sub.g.v, {def_value : def} }
#define ASCALAR(v, name, def) { sub.aparm.v.vtype, name, Parameters::k_param_ ## v, (const void *)&sub.aparm.v, {def_value : def} }
#define GGROUP(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &sub.g.v, {group_info : class::var_info} }
#define GOBJECT(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, (const void *)&sub.v, {group_info : class::var_info} }
#define GOBJECTN(v, pname, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## pname, (const void *)&sub.v, {group_info : class::var_info} }
const AP_Param::Info Sub::var_info[] = {
// @Param: SURFACE_DEPTH
@ -615,7 +609,7 @@ const AP_Param::Info Sub::var_info[] = {
// @Group:
// @Path: ../libraries/AP_Vehicle/AP_Vehicle.cpp
{ AP_PARAM_GROUP, "", Parameters::k_param_vehicle, (const void *)&sub, {group_info : AP_Vehicle::var_info} },
PARAM_VEHICLE_INFO,
AP_VAREND
};

View File

@ -1,5 +1,7 @@
#pragma once
#define AP_PARAM_VEHICLE_NAME sub
#include <AP_Common/AP_Common.h>
#include <AP_Gripper/AP_Gripper.h>