mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
generate_params.py: fix parse_yaml_parameters_config
Correctly handle multiple parameter sections
This commit is contained in:
Regular → Executable
+2
-2
@@ -40,11 +40,11 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
if 'parameters' not in yaml_config:
|
||||
return ''
|
||||
parameters_section_list = yaml_config['parameters']
|
||||
ret = ''
|
||||
for parameters_section in parameters_section_list:
|
||||
if 'definitions' not in parameters_section:
|
||||
return ''
|
||||
continue
|
||||
definitions = parameters_section['definitions']
|
||||
ret = ''
|
||||
param_group = parameters_section.get('group', None)
|
||||
for param_name in definitions:
|
||||
param = definitions[param_name]
|
||||
|
||||
Reference in New Issue
Block a user