From 42d2f8a798db163d25a1fba98759abc13a302fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 18 Apr 2017 10:11:57 +0200 Subject: [PATCH] px4airframes markdown output: merge output columns with maintainer --- Tools/px4airframes/markdownout.py | 23 +++++++++++++++++------ Tools/px4airframes/srcparser.py | 4 ++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Tools/px4airframes/markdownout.py b/Tools/px4airframes/markdownout.py index 7c8472a05e..e4abf377cc 100644 --- a/Tools/px4airframes/markdownout.py +++ b/Tools/px4airframes/markdownout.py @@ -4,12 +4,15 @@ import codecs class MarkdownTablesOutput(): def __init__(self, groups, board): result = ("# Airframes Reference\n" - "> **Note** **This list is auto-generated from the source code** and contains the most recent airframes documentation.\n" + "> **Note** **This list is auto-generated from the source code**.\n" "> \n" "> The **AUX** channels are only available on Pixhawk Boards (labeled with **AUX OUT**).\n" + "> \n" "\n") - # TODO: describe meaning of green + blue color... + result += """This page lists all supported airframes and types including + the motor assignment and numbering. The motors in **green** rotate clockwise, + the ones in **blue** conterclockwise.\n\n""" for group in groups: @@ -19,7 +22,7 @@ class MarkdownTablesOutput(): image_name = group.GetImageName() result += '
\n' if image_name != 'AirframeUnknown': - result += '\n' % (image_name) + result += '\n' % (image_name) # check if all outputs are equal for the group: if so, show them # only once @@ -61,9 +64,9 @@ class MarkdownTablesOutput(): result += '
\n\n' result += '\n' - result += ' \n' + result += ' \n' result += ' \n' - result += ' \n' + result += ' \n' result += ' \n' result += '\n' @@ -82,6 +85,7 @@ class MarkdownTablesOutput(): if url != '': name_entry = '%s' % (url, name) outputs = '' + if has_outputs: + outputs_entry = '

Specific Outputs:' + outputs + '

' + else: + outputs_entry = '' - result += '\n \n \n \n\n' % (name_entry, maintainer_entry, airframe_id_entry, outputs) + result += ('\n \n \n\n\n' % + (name_entry, maintainer_entry, airframe_id_entry, + outputs_entry)) #Close the table. diff --git a/Tools/px4airframes/srcparser.py b/Tools/px4airframes/srcparser.py index e3041af6ba..64692439e3 100644 --- a/Tools/px4airframes/srcparser.py +++ b/Tools/px4airframes/srcparser.py @@ -67,9 +67,9 @@ class ParameterGroup(object): elif (self.name == "Helicopter"): return "Helicopter" elif (self.name == "Hexarotor Coaxial"): - return "Y6A" - elif (self.name == "Y6B"): return "Y6B" + elif (self.name == "Y6A"): + return "Y6A" elif (self.name == "Tricopter Y-"): return "YMinus" elif (self.name == "Tricopter Y+"):
NameSpecific Outputs
Name
%s%s%s%s
%s%s%s%s