generate_actuators_metadata.py: add mixer rules support

This commit is contained in:
Beat Küng 2021-11-24 10:49:12 +01:00 committed by Daniel Agar
parent 230aae580f
commit 5bcc5d3a13
2 changed files with 16 additions and 0 deletions

View File

@ -417,10 +417,18 @@ def get_mixers(yaml_config, output_functions, verbose):
if verbose:
print('Mixer configs: {}'.format(config))
rules = []
for rule in yaml_config['mixer'].get('rules', []):
rules.append({k.replace('_','-'): v for k, v in rule.items()})
if verbose:
print('Mixer rules: {}'.format(rules))
mixers = {
'actuator-types': actuator_types,
'config': config,
'rules': rules,
}
return mixers

View File

@ -498,6 +498,12 @@ mixer:
type: integer
function:
type: string
identifier:
# for rules
type: string
rules:
# mixer rules, validated by the mavlink actuator component information schema
type: list
config:
# Airframe types
type: dict
@ -526,6 +532,8 @@ mixer:
schema:
actuator_type:
type: string
group_label:
type: string
count:
# param name or fixed count
oneof: