diff options
author | Alexander Lourier <aml@rulezz.ru> | 2013-10-18 03:47:15 +0400 |
---|---|---|
committer | Alexander Lourier <aml@rulezz.ru> | 2013-10-18 03:47:15 +0400 |
commit | 0f67c5cbb0f69e5b9dda4e4e75120e63e466e1f8 (patch) | |
tree | ed6659f943e5bbacd6bbf461c3ad952a484835c9 /Tools/px4params/dokuwikiout.py | |
parent | 53c85a24eaf64bcac81e86c1e9ba0df10cdbb5da (diff) | |
download | px4-firmware-0f67c5cbb0f69e5b9dda4e4e75120e63e466e1f8.tar.gz px4-firmware-0f67c5cbb0f69e5b9dda4e4e75120e63e466e1f8.tar.bz2 px4-firmware-0f67c5cbb0f69e5b9dda4e4e75120e63e466e1f8.zip |
Parameters list generator
Diffstat (limited to 'Tools/px4params/dokuwikiout.py')
-rw-r--r-- | Tools/px4params/dokuwikiout.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Tools/px4params/dokuwikiout.py b/Tools/px4params/dokuwikiout.py new file mode 100644 index 000000000..33f76b415 --- /dev/null +++ b/Tools/px4params/dokuwikiout.py @@ -0,0 +1,27 @@ +import output + +class DokuWikiOutput(output.Output): + def Generate(self, groups): + result = "" + for group in groups: + result += "==== %s ====\n\n" % group.GetName() + for param in group.GetParams(): + code = param.GetFieldValue("code") + name = param.GetFieldValue("short_desc") + if code != name: + name = "%s (%s)" % (name, code) + result += "=== %s ===\n\n" % name + long_desc = param.GetFieldValue("long_desc") + if long_desc is not None: + result += "%s\n\n" % long_desc + min_val = param.GetFieldValue("min") + if min_val is not None: + result += "* Minimal value: %s\n" % min_val + max_val = param.GetFieldValue("max") + if max_val is not None: + result += "* Maximal value: %s\n" % max_val + def_val = param.GetFieldValue("default") + if def_val is not None: + result += "* Default value: %s\n" % def_val + result += "\n" + return result |