mirror of https://github.com/ArduPilot/ardupilot
Tools: make parameter generation failure clearer
This commit is contained in:
parent
f8d5fe96d8
commit
dca866c98d
|
@ -69,6 +69,8 @@ DO NOT EDIT
|
|||
t += "<table><th>Value</th><th>Meaning</th>\n"
|
||||
for value in values:
|
||||
v = value.split(':')
|
||||
if len(v) != 2:
|
||||
raise ValueError("Bad value (%s)" % v)
|
||||
t += "<tr><td>%s</td><td>%s</td></tr>\n" % (v[0], v[1])
|
||||
t += "</table>\n"
|
||||
elif field == 'Units':
|
||||
|
|
|
@ -98,6 +98,8 @@ class MDEmit(Emit):
|
|||
t += "\n|:---:|:---:|"
|
||||
for value in values:
|
||||
v = value.split(':')
|
||||
if len(v) != 2:
|
||||
raise ValueError("Bad value (%s)" % v)
|
||||
t += "\n|%s|%s|" % (v[0], v[1])
|
||||
else:
|
||||
t += "\n\n- %s: %s" % (field, param.__dict__[field])
|
||||
|
|
|
@ -62,6 +62,8 @@ class WikiEmit(Emit):
|
|||
t += "|| *Value* || *Meaning* ||\n"
|
||||
for value in values:
|
||||
v = value.split(':')
|
||||
if len(v) != 2:
|
||||
raise ValueError("Bad value (%s)" % v)
|
||||
t += "|| " + v[0] + " || " + self.camelcase_escape(v[1]) + " ||\n"
|
||||
elif field == 'Units':
|
||||
abreviated_units = param.__dict__[field]
|
||||
|
|
|
@ -57,6 +57,8 @@ class XmlEmit(Emit):
|
|||
values = (param.__dict__[field]).split(',')
|
||||
for value in values:
|
||||
v = value.split(':')
|
||||
if len(v) != 2:
|
||||
raise ValueError("Bad value (%s)" % v)
|
||||
t += '''<value code=%s>%s</value>\n''' % (quoteattr(v[0]), escape(v[1])) # i.e. numeric value, string label
|
||||
|
||||
t += "</values>\n"
|
||||
|
|
Loading…
Reference in New Issue