diff options
Diffstat (limited to 'Tools/px4params/dokuwikiout.py')
-rw-r--r-- | Tools/px4params/dokuwikiout.py | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/Tools/px4params/dokuwikiout.py b/Tools/px4params/dokuwikiout.py index c5cf65ea6..e02035423 100644 --- a/Tools/px4params/dokuwikiout.py +++ b/Tools/px4params/dokuwikiout.py @@ -19,34 +19,40 @@ class DokuWikiOutput(output.Output): for group in groups: result += "==== %s ====\n\n" % group.GetName() result += "|< 100% 20% 20% 10% 10% 10% 30%>|\n" - result += "^ Name ^ Description ^ Min ^ Max ^ Default ^ Comment ^\n" + result += "^ Name ^ Description ^ Min ^ Max ^ Default ^ Comment ^\n" for param in group.GetParams(): code = param.GetFieldValue("code") name = param.GetFieldValue("short_desc") - name = name.replace("\n", "") - result += "| %s | %s " % (code, name) min_val = param.GetFieldValue("min") + max_val = param.GetFieldValue("max") + def_val = param.GetFieldValue("default") + long_desc = param.GetFieldValue("long_desc") + + name = name.replace("\n", " ") + result += "| %s | %s |" % (code, name) + if min_val is not None: - result += " | %s " % min_val + result += " %s |" % min_val else: - result += " | " - max_val = param.GetFieldValue("max") + result += " |" + if max_val is not None: - result += " | %s " % max_val + result += " %s |" % max_val else: - result += " | " - def_val = param.GetFieldValue("default") + result += " |" + if def_val is not None: - result += "| %s " % def_val + result += " %s |" % def_val else: - result += " | " - long_desc = param.GetFieldValue("long_desc") + result += " |" + if long_desc is not None: - long_desc = long_desc.replace("\n", "") - result += "| %s " % long_desc + long_desc = long_desc.replace("\n", " ") + result += " %s |" % long_desc else: - result += " | " - result += " |\n" + result += " |" + + result += "\n" result += "\n" post_text = """</string> </value> |