From 55843932eb58732e7ec0fd080bea238188eec663 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 24 Dec 2014 18:26:51 -0800 Subject: [PATCH] Summary button content now comes from QML --- .../PX4/RadioComponentSummary.qml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/AutoPilotPlugins/PX4/RadioComponentSummary.qml diff --git a/src/AutoPilotPlugins/PX4/RadioComponentSummary.qml b/src/AutoPilotPlugins/PX4/RadioComponentSummary.qml new file mode 100644 index 000000000..bf255097f --- /dev/null +++ b/src/AutoPilotPlugins/PX4/RadioComponentSummary.qml @@ -0,0 +1,65 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Controls.Styles 1.2 +import QGroundControl.FactSystem 1.0 +import QGroundControl.FactControls 1.0 + +Column { + anchors.fill: parent + anchors.margins: 8 + + Row { + width: parent.width + + Text { id: roll; text: "Roll:" } + Text { + horizontalAlignment: Text.AlignRight + width: parent.width - roll.contentWidth + text: autopilot.parameters["RC_MAP_ROLL"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_ROLL"].value + } + } + + Row { + width: parent.width + + Text { id: pitch; text: "Pitch:" } + Text { + horizontalAlignment: Text.AlignRight + width: parent.width - pitch.contentWidth + text: autopilot.parameters["RC_MAP_PITCH"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_PITCH"].value + } + } + + Row { + width: parent.width + + Text { id: yaw; text: "Yaw:" } + Text { + horizontalAlignment: Text.AlignRight + width: parent.width - yaw.contentWidth + text: autopilot.parameters["RC_MAP_YAW"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_YAW"].value + } + } + + Row { + width: parent.width + + Text { id: throttle; text: "Throttle:" } + Text { + horizontalAlignment: Text.AlignRight + width: parent.width - throttle.contentWidth + text: autopilot.parameters["RC_MAP_THROTTLE"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_THROTTLE"].value + } + } + + Row { + width: parent.width + + Text { id: mode; text: "Mode switch:" } + Text { + horizontalAlignment: Text.AlignRight + width: parent.width - mode.contentWidth + text: autopilot.parameters["RC_MAP_MODE_SW"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_MODE_SW"].value + } + } +} -- 2.22.0