mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 21:21:35 +08:00
parameters: add boolean support (PARAM_DEFINE_BOOL)
- real boolean parameter support saves a bit of space in export (bson) and in mavlink sync
This commit is contained in:
@@ -111,7 +111,7 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
for key in param['values']:
|
||||
tags += '\n * @value {:} {:}'.format(key, param['values'][key])
|
||||
elif param['type'] == 'boolean':
|
||||
param_type = 'INT32'
|
||||
param_type = 'BOOL'
|
||||
tags += '\n * @boolean'
|
||||
elif param['type'] == 'int32':
|
||||
param_type = 'INT32'
|
||||
@@ -136,9 +136,6 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
else:
|
||||
default_value = param['default']
|
||||
|
||||
if type(default_value) == bool:
|
||||
default_value = int(default_value)
|
||||
|
||||
# output the existing C-style format
|
||||
ret += '''
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user