Commit 0e364ebc authored by Stefan Dunca's avatar Stefan Dunca

WIP: Enable mavlink dev console in expert mode for mobile devices

TODO: Improve the experience
parent 339cfeb5
...@@ -626,6 +626,7 @@ HEADERS += \ ...@@ -626,6 +626,7 @@ HEADERS += \
src/uas/UASInterface.h \ src/uas/UASInterface.h \
src/uas/UASMessageHandler.h \ src/uas/UASMessageHandler.h \
src/UTM.h \ src/UTM.h \
src/AnalyzeView/MavlinkConsoleController.h \
AndroidBuild { AndroidBuild {
...@@ -661,7 +662,6 @@ HEADERS += \ ...@@ -661,7 +662,6 @@ HEADERS += \
!MobileBuild { !MobileBuild {
HEADERS += \ HEADERS += \
src/AnalyzeView/GeoTagController.h \ src/AnalyzeView/GeoTagController.h \
src/AnalyzeView/MavlinkConsoleController.h \
src/GPS/Drivers/src/gps_helper.h \ src/GPS/Drivers/src/gps_helper.h \
src/GPS/Drivers/src/rtcm.h \ src/GPS/Drivers/src/rtcm.h \
src/GPS/Drivers/src/ashtech.h \ src/GPS/Drivers/src/ashtech.h \
...@@ -828,6 +828,7 @@ SOURCES += \ ...@@ -828,6 +828,7 @@ SOURCES += \
src/uas/UAS.cc \ src/uas/UAS.cc \
src/uas/UASMessageHandler.cc \ src/uas/UASMessageHandler.cc \
src/UTM.cpp \ src/UTM.cpp \
src/AnalyzeView/MavlinkConsoleController.cc \
DebugBuild { DebugBuild {
SOURCES += \ SOURCES += \
...@@ -850,7 +851,6 @@ contains(DEFINES, QGC_ENABLE_BLUETOOTH) { ...@@ -850,7 +851,6 @@ contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
!MobileBuild { !MobileBuild {
SOURCES += \ SOURCES += \
src/AnalyzeView/GeoTagController.cc \ src/AnalyzeView/GeoTagController.cc \
src/AnalyzeView/MavlinkConsoleController.cc \
src/GPS/Drivers/src/gps_helper.cpp \ src/GPS/Drivers/src/gps_helper.cpp \
src/GPS/Drivers/src/rtcm.cpp \ src/GPS/Drivers/src/rtcm.cpp \
src/GPS/Drivers/src/ashtech.cpp \ src/GPS/Drivers/src/ashtech.cpp \
......
...@@ -90,10 +90,13 @@ AnalyzePage { ...@@ -90,10 +90,13 @@ AnalyzePage {
id: command id: command
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: "Enter Commands here..." placeholderText: "Enter Commands here..."
onAccepted: {
function sendCommand() {
conController.sendCommand(text) conController.sendCommand(text)
text = "" text = ""
} }
onAccepted: sendCommand()
Keys.onPressed: { Keys.onPressed: {
if (event.key == Qt.Key_Up) { if (event.key == Qt.Key_Up) {
text = conController.historyUp(text); text = conController.historyUp(text);
...@@ -105,6 +108,14 @@ AnalyzePage { ...@@ -105,6 +108,14 @@ AnalyzePage {
} }
} }
QGCButton {
id: sendButton
text: qsTr("Send")
visible: ScreenTools.isMobile
onClicked: command.sendCommand()
}
QGCButton { QGCButton {
id: followTail id: followTail
text: qsTr("Show Latest") text: qsTr("Show Latest")
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
#include "ShapeFileHelper.h" #include "ShapeFileHelper.h"
#include "QGCFileDownload.h" #include "QGCFileDownload.h"
#include "FirmwareImage.h" #include "FirmwareImage.h"
#include "MavlinkConsoleController.h"
#ifndef NO_SERIAL_LINK #ifndef NO_SERIAL_LINK
#include "SerialLink.h" #include "SerialLink.h"
...@@ -101,7 +102,6 @@ ...@@ -101,7 +102,6 @@
#include "FirmwareUpgradeController.h" #include "FirmwareUpgradeController.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "GeoTagController.h" #include "GeoTagController.h"
#include "MavlinkConsoleController.h"
#include "GPS/GPSManager.h" #include "GPS/GPSManager.h"
#endif #endif
...@@ -458,8 +458,8 @@ void QGCApplication::_initCommon(void) ...@@ -458,8 +458,8 @@ void QGCApplication::_initCommon(void)
qmlRegisterType<FirmwareUpgradeController> (kQGCControllers, 1, 0, "FirmwareUpgradeController"); qmlRegisterType<FirmwareUpgradeController> (kQGCControllers, 1, 0, "FirmwareUpgradeController");
#endif #endif
qmlRegisterType<GeoTagController> (kQGCControllers, 1, 0, "GeoTagController"); qmlRegisterType<GeoTagController> (kQGCControllers, 1, 0, "GeoTagController");
qmlRegisterType<MavlinkConsoleController> (kQGCControllers, 1, 0, "MavlinkConsoleController");
#endif #endif
qmlRegisterType<MavlinkConsoleController> (kQGCControllers, 1, 0, "MavlinkConsoleController");
// Register Qml Singletons // Register Qml Singletons
qmlRegisterSingletonType<QGroundControlQmlGlobal> ("QGroundControl", 1, 0, "QGroundControl", qgroundcontrolQmlGlobalSingletonFactory); qmlRegisterSingletonType<QGroundControlQmlGlobal> ("QGroundControl", 1, 0, "QGroundControl", qgroundcontrolQmlGlobalSingletonFactory);
......
...@@ -38,7 +38,7 @@ Item { ...@@ -38,7 +38,7 @@ Item {
readonly property string _settingsViewSource: "AppSettings.qml" readonly property string _settingsViewSource: "AppSettings.qml"
readonly property string _setupViewSource: "SetupView.qml" readonly property string _setupViewSource: "SetupView.qml"
readonly property string _planViewSource: "PlanView.qml" readonly property string _planViewSource: "PlanView.qml"
readonly property string _analyzeViewSource: "AnalyzeView.qml" readonly property string _analyzeViewSource: !ScreenTools.isMobile ? "AnalyzeView.qml" : "MavlinkConsolePage.qml"
onHeightChanged: { onHeightChanged: {
//-- We only deal with the available height if within the Fly or Plan view //-- We only deal with the available height if within the Fly or Plan view
......
...@@ -136,7 +136,7 @@ Rectangle { ...@@ -136,7 +136,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
exclusiveGroup: mainActionGroup exclusiveGroup: mainActionGroup
source: "/qmlimages/Analyze.svg" source: "/qmlimages/Analyze.svg"
visible: !ScreenTools.isMobile && QGroundControl.corePlugin.showAdvancedUI visible: QGroundControl.corePlugin.showAdvancedUI
onClicked: toolBar.showAnalyzeView() onClicked: toolBar.showAnalyzeView()
} }
......
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