AP_Param: added a flag for hidden parameters

This commit is contained in:
Andrew Tridgell 2021-09-01 08:26:01 +10:00 committed by Peter Barker
parent ccd330a40a
commit 10cbd3fd80
2 changed files with 7 additions and 1 deletions

View File

@ -1682,6 +1682,9 @@ AP_Param *AP_Param::next_group(const uint16_t vindex, const struct GroupInfo *gr
((AP_Int8 *)ret)->get() == 0) {
token->last_disabled = 1;
}
if (group_info[i].flags & AP_PARAM_FLAG_HIDDEN) {
continue;
}
return ret;
}
if (group_id(group_info, group_base, i, group_shift) == token->group_element) {

View File

@ -72,13 +72,16 @@
// use.
#define AP_PARAM_FLAG_INTERNAL_USE_ONLY (1<<5)
// hide parameter from param download
#define AP_PARAM_FLAG_HIDDEN (1<<6)
// keep all flags before the FRAME tags
// vehicle and frame type flags, used to hide parameters when not
// relevent to a vehicle type. Use AP_Param::set_frame_type_flags() to
// enable parameters flagged in this way. frame type flags are stored
// in flags field, shifted by AP_PARAM_FRAME_TYPE_SHIFT.
#define AP_PARAM_FRAME_TYPE_SHIFT 6
#define AP_PARAM_FRAME_TYPE_SHIFT 7
// supported frame types for parameters
#define AP_PARAM_FRAME_COPTER (1<<0)