forked from Archive/PX4-Autopilot
generate_actuators_metadata.py: add mixer rules support
This commit is contained in:
parent
230aae580f
commit
5bcc5d3a13
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue