Commit 75def93b authored by Bill Bonney's avatar Bill Bonney

APM ToolBar chnages

parent db3e3dab
......@@ -773,7 +773,8 @@ unix:!macx:!symbian: LIBS += -losg
OTHER_FILES += \
dongfang_notes.txt \
src/ui/dongfang-scrapyard.txt
src/ui/dongfang-scrapyard.txt \
qml/components/DigitalDisplay.qml
OTHER_FILES += \
qml/ApmToolBar.qml \
......
......@@ -25,6 +25,7 @@ Rectangle {
}
}
// [BB] The code below should work, not sure why. replaced with code above
// Connections {
// target: globalObj
// onMAVConnected: {
......@@ -43,7 +44,7 @@ Rectangle {
anchors.left: parent.left
spacing: 2
Rectangle {
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
......@@ -94,6 +95,44 @@ Rectangle {
image: "./resources/apmplanner/toolbar/terminal.png"
onClicked: globalObj.triggerTerminalView()
}
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
}
// DigitalDisplay { // Information Pane
// title:"Mode"
// textValue: "Stabilize"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Speed"
// textValue: "11.0m/s"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Alt"
// textValue: "20.0m"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Volts"
// textValue: "14.8V"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Current"
// textValue: "12.0A"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Level"
// textValue: "77%"
// color: "black"
// }
}
Row {
......@@ -129,7 +168,7 @@ Rectangle {
onClicked: globalObj.connectMAV()
}
Rectangle {
Rectangle { // Spacer
anchors.right: parent.right
width: 5
height: parent.height
......
import QtQuick 1.1
Rectangle {
property alias title: displayTitle.text
property string textValue: "none"
width: 100
height: parent.height/3
anchors.verticalCenter: parent.verticalCenter
border.color: "white"
Text {
id:displayTitle
anchors.left: parent.left
anchors.leftMargin: 3
anchors.verticalCenter: parent.verticalCenter
text: "blank"
color: "white"
}
Text {
id:displayValue
anchors.right: parent.right
anchors.rightMargin: 3
anchors.verticalCenter: parent.verticalCenter
text: textValue
color: "white"
}
}
......@@ -96,6 +96,7 @@ QVector<QString>* SerialLink::getCurrentPorts()
Q_ASSERT_X(m_ports != NULL, "getCurrentPorts", "m_ports is NULL");
m_ports->clear();
// Example use QSerialPortInfo
// [TODO] make this thread safe
foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
{
// qDebug() << "PortName : " << info.portName()
......
......@@ -21,7 +21,8 @@ APMToolBar::APMToolBar(QWidget *parent):
}
QObject *object = rootObject();
object->setProperty("connected", false);
if (object)
object->setProperty("connected", false);
}
void APMToolBar::setFlightViewAction(QAction *action)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment