mirror of https://github.com/ArduPilot/ardupilot
autotest: param_parse.py: correct JSON output
This commit is contained in:
parent
178ae9e0c1
commit
dfa373c1d7
|
@ -12,7 +12,6 @@ class JSONEmit(Emit):
|
|||
json_fname = 'apm.pdef.json'
|
||||
self.f = open(json_fname, mode='w')
|
||||
self.content = {"json": {"version": 0}}
|
||||
self.name = ''
|
||||
|
||||
def close(self):
|
||||
json.dump(self.content, self.f, indent=2, sort_keys=True)
|
||||
|
@ -33,7 +32,7 @@ class JSONEmit(Emit):
|
|||
# Copy content to avoid any modification
|
||||
g = copy.deepcopy(g)
|
||||
|
||||
self.content[self.name] = {}
|
||||
self.content[g.name] = {}
|
||||
|
||||
# Check all params available
|
||||
for param in g.params:
|
||||
|
@ -97,4 +96,4 @@ class JSONEmit(Emit):
|
|||
|
||||
# Update main content with actual content
|
||||
for key in content:
|
||||
self.content[self.name][key] = content[key]
|
||||
self.content[g.name][key] = content[key]
|
||||
|
|
Loading…
Reference in New Issue