Skip to content
Snippets Groups Projects
Commit 75def93b authored by Bill Bonney's avatar Bill Bonney
Browse files

APM ToolBar chnages

parent db3e3dab
No related branches found
No related tags found
No related merge requests found
...@@ -773,7 +773,8 @@ unix:!macx:!symbian: LIBS += -losg ...@@ -773,7 +773,8 @@ unix:!macx:!symbian: LIBS += -losg
OTHER_FILES += \ OTHER_FILES += \
dongfang_notes.txt \ dongfang_notes.txt \
src/ui/dongfang-scrapyard.txt src/ui/dongfang-scrapyard.txt \
qml/components/DigitalDisplay.qml
OTHER_FILES += \ OTHER_FILES += \
qml/ApmToolBar.qml \ qml/ApmToolBar.qml \
......
...@@ -25,6 +25,7 @@ Rectangle { ...@@ -25,6 +25,7 @@ Rectangle {
} }
} }
// [BB] The code below should work, not sure why. replaced with code above
// Connections { // Connections {
// target: globalObj // target: globalObj
// onMAVConnected: { // onMAVConnected: {
...@@ -43,7 +44,7 @@ Rectangle { ...@@ -43,7 +44,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
spacing: 2 spacing: 2
Rectangle { Rectangle { // Spacer
width: 5 width: 5
height: parent.height height: parent.height
color: "black" color: "black"
...@@ -94,6 +95,44 @@ Rectangle { ...@@ -94,6 +95,44 @@ Rectangle {
image: "./resources/apmplanner/toolbar/terminal.png" image: "./resources/apmplanner/toolbar/terminal.png"
onClicked: globalObj.triggerTerminalView() 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 { Row {
...@@ -129,7 +168,7 @@ Rectangle { ...@@ -129,7 +168,7 @@ Rectangle {
onClicked: globalObj.connectMAV() onClicked: globalObj.connectMAV()
} }
Rectangle { Rectangle { // Spacer
anchors.right: parent.right anchors.right: parent.right
width: 5 width: 5
height: parent.height 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() ...@@ -96,6 +96,7 @@ QVector<QString>* SerialLink::getCurrentPorts()
Q_ASSERT_X(m_ports != NULL, "getCurrentPorts", "m_ports is NULL"); Q_ASSERT_X(m_ports != NULL, "getCurrentPorts", "m_ports is NULL");
m_ports->clear(); m_ports->clear();
// Example use QSerialPortInfo // Example use QSerialPortInfo
// [TODO] make this thread safe
foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts())
{ {
// qDebug() << "PortName : " << info.portName() // qDebug() << "PortName : " << info.portName()
......
...@@ -21,7 +21,8 @@ APMToolBar::APMToolBar(QWidget *parent): ...@@ -21,7 +21,8 @@ APMToolBar::APMToolBar(QWidget *parent):
} }
QObject *object = rootObject(); QObject *object = rootObject();
object->setProperty("connected", false); if (object)
object->setProperty("connected", false);
} }
void APMToolBar::setFlightViewAction(QAction *action) void APMToolBar::setFlightViewAction(QAction *action)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment