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:
Daniel Agar
2021-12-23 17:08:12 -05:00
parent 38af93085b
commit f23740a3c5
93 changed files with 525 additions and 232 deletions
+1 -4
View File
@@ -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 += '''
/**