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
@@ -417,10 +417,18 @@ def get_mixers(yaml_config, output_functions, verbose):
if verbose: if verbose:
print('Mixer configs: {}'.format(config)) 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 = { mixers = {
'actuator-types': actuator_types, 'actuator-types': actuator_types,
'config': config, 'config': config,
'rules': rules,
} }
return mixers return mixers
+8
View File
@@ -498,6 +498,12 @@ mixer:
type: integer type: integer
function: function:
type: string type: string
identifier:
# for rules
type: string
rules:
# mixer rules, validated by the mavlink actuator component information schema
type: list
config: config:
# Airframe types # Airframe types
type: dict type: dict
@@ -526,6 +532,8 @@ mixer:
schema: schema:
actuator_type: actuator_type:
type: string type: string
group_label:
type: string
count: count:
# param name or fixed count # param name or fixed count
oneof: oneof: