Browse Source

param jsonout: handle @boolean flag

This got lost when switching from xml to json metadata
master
Beat Küng 3 years ago committed by Daniel Agar
parent
commit
393f59ae71
  1. 5
      src/lib/parameters/px4params/jsonout.py

5
src/lib/parameters/px4params/jsonout.py

@ -93,6 +93,11 @@ class JsonOutput(): @@ -93,6 +93,11 @@ class JsonOutput():
code_dict['description']=param.GetEnumValue(item)
codes_list.append(code_dict)
curr_param['values'] = codes_list
elif param.GetBoolean():
curr_param['values'] = [
{ 'value': 0, 'description': 'Disabled' },
{ 'value': 1, 'description': 'Enabled' }
]
if len(param.GetBitmaskList()) > 0:

Loading…
Cancel
Save