From b2dc9ee710eba63e414a92826fa17f7a929a722d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 16 Feb 2022 11:02:53 +0100 Subject: [PATCH] control_allocator: add title & help url to geometry UI --- Tools/module_config/generate_actuators_metadata.py | 6 ++++-- src/modules/control_allocator/module.yaml | 8 ++++++++ validation/module_schema.yaml | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Tools/module_config/generate_actuators_metadata.py b/Tools/module_config/generate_actuators_metadata.py index 358418fb9e..a7348be7c1 100755 --- a/Tools/module_config/generate_actuators_metadata.py +++ b/Tools/module_config/generate_actuators_metadata.py @@ -330,9 +330,11 @@ def get_mixers(yaml_config, output_functions, verbose): option = select_param + '==' + str(type_index) mixer_config = { 'option': option, + 'help-url': 'https://docs.px4.io/master/en/config/actuators.html', } - if 'type' in current_type: - mixer_config['type'] = current_type['type'] + for optional in ['type', 'title']: + if optional in current_type: + mixer_config[optional] = current_type[optional] actuators = [] for actuator_conf in current_type['actuators']: actuator = { diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index aa72cd00c2..d58ea18715 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -478,6 +478,7 @@ mixer: types: 0: # Multirotor type: 'multirotor' + title: 'Multirotor' actuators: - actuator_type: 'motor' count: 'CA_ROTOR_COUNT' @@ -491,6 +492,7 @@ mixer: show_as: 'true-if-positive' 1: # Fixed Wing + title: 'Fixed Wing' actuators: - actuator_type: 'motor' group_label: 'Motors' @@ -520,6 +522,7 @@ mixer: label: 'Trim' 2: # Standard VTOL + title: 'Standard VTOL' actuators: - actuator_type: 'motor' group_label: 'MC Motors' @@ -561,6 +564,7 @@ mixer: name: VT_ELEV_MC_LOCK 3: # Tiltrotor VTOL + title: 'Tiltrotor VTOL' actuators: - actuator_type: 'motor' group_label: 'MC Motors' @@ -615,6 +619,7 @@ mixer: label: 'Use for Control' 4: # Tailsitter VTOL + title: 'Tailsitter VTOL' actuators: - actuator_type: 'motor' group_label: 'MC Motors' @@ -653,6 +658,7 @@ mixer: name: VT_ELEV_MC_LOCK 5: # Rover (Ackermann) + title: 'Rover (Ackermann)' actuators: - actuator_type: 'motor' instances: @@ -664,6 +670,7 @@ mixer: position: [ 1., 0, 0 ] 6: # Rover (Differential) + title: 'Rover (Differential)' actuators: - actuator_type: 'motor' instances: @@ -693,6 +700,7 @@ mixer: label: "Moment\nCoefficient" 8: # Multirotor with Tilt + title: 'Multirotor with Tilt' actuators: - actuator_type: 'motor' count: 'CA_ROTOR_COUNT' diff --git a/validation/module_schema.yaml b/validation/module_schema.yaml index 465b56b0e0..64700568fb 100644 --- a/validation/module_schema.yaml +++ b/validation/module_schema.yaml @@ -524,6 +524,8 @@ mixer: # show type-specific functionality) type: string allowed: [ multirotor ] + title: + type: string actuators: type: list minlength: 1