mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 03:36:07 +08:00
Update json param field names
This commit is contained in:
@@ -22,8 +22,8 @@ class JsonOutput():
|
|||||||
#xml_version.text = "15"
|
#xml_version.text = "15"
|
||||||
|
|
||||||
schema_map = {
|
schema_map = {
|
||||||
"short_desc": "shortDescription",
|
"short_desc": "shortDesc",
|
||||||
"long_desc": "longDescription",
|
"long_desc": "longDesc",
|
||||||
"unit": "units",
|
"unit": "units",
|
||||||
"decimal": "decimalPlaces",
|
"decimal": "decimalPlaces",
|
||||||
"min": "min",
|
"min": "min",
|
||||||
@@ -42,7 +42,7 @@ class JsonOutput():
|
|||||||
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
|
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
|
||||||
curr_param=dict()
|
curr_param=dict()
|
||||||
curr_param['name'] = param.GetName()
|
curr_param['name'] = param.GetName()
|
||||||
curr_param['defaultValue'] = param.GetDefault()
|
curr_param['default'] = param.GetDefault()
|
||||||
curr_param['type'] = param.GetType().capitalize()
|
curr_param['type'] = param.GetType().capitalize()
|
||||||
if not curr_param['type'] in allowed_types:
|
if not curr_param['type'] in allowed_types:
|
||||||
print("Error: %s type not supported: curr_param['type']" % (curr_param['name'],curr_param['type']) )
|
print("Error: %s type not supported: curr_param['type']" % (curr_param['name'],curr_param['type']) )
|
||||||
|
|||||||
Reference in New Issue
Block a user