mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-09 16:13:56 -03:00
AP_Param: nested group recursion into next_group disableable by macro
* c.f. 0251932c81fe7eb, e5515bb6ef82
This commit is contained in:
parent
2648694489
commit
337af0c7a2
@ -719,6 +719,7 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf
|
|||||||
for (uint8_t i=0;
|
for (uint8_t i=0;
|
||||||
(type=(enum ap_var_type)PGM_UINT8(&group_info[i].type)) != AP_PARAM_NONE;
|
(type=(enum ap_var_type)PGM_UINT8(&group_info[i].type)) != AP_PARAM_NONE;
|
||||||
i++) {
|
i++) {
|
||||||
|
#ifdef AP_NESTED_GROUPS_ENABLED
|
||||||
if (type == AP_PARAM_GROUP) {
|
if (type == AP_PARAM_GROUP) {
|
||||||
// a nested group
|
// a nested group
|
||||||
const struct GroupInfo *ginfo = (const struct GroupInfo *)PGM_POINTER(&group_info[i].group_info);
|
const struct GroupInfo *ginfo = (const struct GroupInfo *)PGM_POINTER(&group_info[i].group_info);
|
||||||
@ -728,7 +729,9 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf
|
|||||||
if (ap != NULL) {
|
if (ap != NULL) {
|
||||||
return ap;
|
return ap;
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
#endif // AP_NESTED_GROUPS_ENABLED
|
||||||
|
{
|
||||||
if (*found_current) {
|
if (*found_current) {
|
||||||
// got a new one
|
// got a new one
|
||||||
token->key = vindex;
|
token->key = vindex;
|
||||||
|
Loading…
Reference in New Issue
Block a user