Skip to content

Commit

Permalink
AP_Param: added a flag for hidden parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge authored and peterbarker committed Sep 7, 2021
1 parent ccd330a commit 10cbd3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libraries/AP_Param/AP_Param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion libraries/AP_Param/AP_Param.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10cbd3f

Please sign in to comment.