mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
AP_Param: added a flag for hidden parameters
This commit is contained in:
parent
ccd330a40a
commit
10cbd3fd80
@ -1682,6 +1682,9 @@ AP_Param *AP_Param::next_group(const uint16_t vindex, const struct GroupInfo *gr
|
|||||||
((AP_Int8 *)ret)->get() == 0) {
|
((AP_Int8 *)ret)->get() == 0) {
|
||||||
token->last_disabled = 1;
|
token->last_disabled = 1;
|
||||||
}
|
}
|
||||||
|
if (group_info[i].flags & AP_PARAM_FLAG_HIDDEN) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (group_id(group_info, group_base, i, group_shift) == token->group_element) {
|
if (group_id(group_info, group_base, i, group_shift) == token->group_element) {
|
||||||
|
@ -72,13 +72,16 @@
|
|||||||
// use.
|
// use.
|
||||||
#define AP_PARAM_FLAG_INTERNAL_USE_ONLY (1<<5)
|
#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
|
// keep all flags before the FRAME tags
|
||||||
|
|
||||||
// vehicle and frame type flags, used to hide parameters when not
|
// vehicle and frame type flags, used to hide parameters when not
|
||||||
// relevent to a vehicle type. Use AP_Param::set_frame_type_flags() to
|
// relevent to a vehicle type. Use AP_Param::set_frame_type_flags() to
|
||||||
// enable parameters flagged in this way. frame type flags are stored
|
// enable parameters flagged in this way. frame type flags are stored
|
||||||
// in flags field, shifted by AP_PARAM_FRAME_TYPE_SHIFT.
|
// 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
|
// supported frame types for parameters
|
||||||
#define AP_PARAM_FRAME_COPTER (1<<0)
|
#define AP_PARAM_FRAME_COPTER (1<<0)
|
||||||
|
Loading…
Reference in New Issue
Block a user