mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
module.yaml: make long param description optional
Some params are very simple and don't need more.
This commit is contained in:
@@ -145,7 +145,7 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
|||||||
*/
|
*/
|
||||||
PARAM_DEFINE_{param_type}({name}, {default_value});
|
PARAM_DEFINE_{param_type}({name}, {default_value});
|
||||||
'''.format(short_descr=param['description']['short'].replace("\n", "\n * "),
|
'''.format(short_descr=param['description']['short'].replace("\n", "\n * "),
|
||||||
long_descr=param['description']['long'].replace("\n", "\n * "),
|
long_descr=param['description'].get('long', "").replace("\n", "\n * "),
|
||||||
tags=tags,
|
tags=tags,
|
||||||
param_type=param_type,
|
param_type=param_type,
|
||||||
name=param_name.replace('${i}', str(i+instance_start)),
|
name=param_name.replace('${i}', str(i+instance_start)),
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ parameters:
|
|||||||
long:
|
long:
|
||||||
# Long description (can be multiple lines)
|
# Long description (can be multiple lines)
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: false
|
||||||
|
|
||||||
type:
|
type:
|
||||||
# Define the parameter type
|
# Define the parameter type
|
||||||
|
|||||||
Reference in New Issue
Block a user