Compare commits

...

6 Commits

Author SHA1 Message Date
Beat Küng df498a776a fix center parameter metadata 2026-03-05 11:29:33 +01:00
ttechnick f466574804 update validation 2026-03-02 12:00:39 +01:00
ttechnick 13823b2a90 disble center for DShot servos (only UI) 2026-03-02 11:57:43 +01:00
ttechnick 77365e44df move center for pca9685 board 2026-03-02 11:57:20 +01:00
ttechnick dfb031e6aa move center after standard params 2026-03-02 11:34:46 +01:00
ttechnick 6e550f2846 PWM center: move from standard_params 2026-03-02 11:34:45 +01:00
5 changed files with 33 additions and 38 deletions
@@ -234,14 +234,14 @@ def get_actuator_output(yaml_config, output_functions, timer_config_file, verbos
param_prefix = process_param_prefix(group['param_prefix'])
standard_params = group.get('standard_params', {})
standard_params_array = [
( 'function', 'Function', 'FUNC', False ),
( 'disarmed', 'Disarmed', 'DIS', False ),
( 'min', 'Minimum', 'MIN', False ),
( 'max', 'Maximum', 'MAX', False ),
( 'center', 'Center\n(for Servos)', 'CENT', False ),
( 'failsafe', 'Failsafe', 'FAIL', True ),
( 'function', 'Function', 'FUNC', False, True ),
( 'disarmed', 'Disarmed', 'DIS', False, True ),
( 'min', 'Minimum', 'MIN', False, True ),
( 'center', 'Center\n(for Servos)', 'CENT', False, False ),
( 'max', 'Maximum', 'MAX', False, True ),
( 'failsafe', 'Failsafe', 'FAIL', True, True ),
]
for key, label, param_suffix, advanced in standard_params_array:
for key, label, param_suffix, advanced, has_function in standard_params_array:
show_if = None
if key in standard_params and 'show_if' in standard_params[key]:
show_if = standard_params[key]['show_if']
@@ -250,13 +250,12 @@ def get_actuator_output(yaml_config, output_functions, timer_config_file, verbos
param = {
'label': label,
'name': param_prefix+'_'+param_suffix+'${i}',
'function': key,
}
if has_function: param['function'] = key
if advanced: param['advanced'] = True
if show_if: param['show-if'] = show_if
per_channel_params.append(param)
param = {
'label': 'Rev Range\n(for Servos)',
'name': param_prefix+'_REV',
+1 -5
View File
@@ -312,11 +312,7 @@ When set to -1 (default), the value depends on the function (see {:}).
if standard_params[key]['max'] >= 1<<16:
raise Exception('maximum value for {:} expected <= {:} (got {:})'.format(key, 1<<16, standard_params[key]['max']))
if key == 'failsafe':
standard_params[key]['default'] = -1
standard_params[key]['min'] = -1
if key == 'center':
if key == 'failsafe' or key == 'center':
standard_params[key]['default'] = -1
standard_params[key]['min'] = -1
+1 -1
View File
@@ -7,8 +7,8 @@ actuator_output:
disarmed: { min: 800, max: 2200, default: 1000 }
min: { min: 800, max: 1400, default: 1100 }
max: { min: 1600, max: 2200, default: 1900 }
center: { min: 800, max: 2200}
failsafe: { min: 800, max: 2200 }
center: { min: 800, max: 2200}
custom_params:
- name: 'DUTY_EN'
label: "Duty-Cycle\n Mode"
+1 -1
View File
@@ -8,8 +8,8 @@ actuator_output:
disarmed: { min: 800, max: 2200, default: 1000 }
min: { min: 800, max: 1400, default: 1000 }
max: { min: 1600, max: 2200, default: 2000 }
center: { min: 800, max: 2200}
failsafe: { min: 800, max: 2200 }
center: { min: 800, max: 2200}
extra_function_groups: [ pwm_fmu ]
pwm_timer_param:
description:
+22 -22
View File
@@ -352,28 +352,6 @@ actuator_output:
# ui only shows the param if this condition is true
type: string
regex: *condition_regex
center:
type: dict
schema:
min:
# Minimum center value
type: integer
min: 0
max: 65536
max:
# Maximum center value
type: integer
min: 0
max: 65536
default:
# Default center value
type: integer
min: 0
max: 65536
show_if:
# ui only shows the param if this condition is true
type: string
regex: *condition_regex
failsafe:
type: dict
schema:
@@ -391,6 +369,28 @@ actuator_output:
# ui only shows the param if this condition is true
type: string
regex: *condition_regex
center:
type: dict
schema:
min:
# Minimum center value
type: integer
min: 0
max: 65536
max:
# Maximum center value
type: integer
min: 0
max: 65536
default:
# Default center value
type: integer
min: 0
max: 65536
show_if:
# ui only shows the param if this condition is true
type: string
regex: *condition_regex
custom_params:
type: list
schema: &mixer_parameter