From 2d050eb332e1a5b27aa75e6ddc810d427ba621c0 Mon Sep 17 00:00:00 2001 From: Stefan Dunca Date: Tue, 12 Mar 2019 19:12:14 +0100 Subject: [PATCH] Fix mavlink console --- src/AnalyzeView/AnalyzeView.qml | 4 ---- src/AnalyzeView/MavlinkConsolePage.qml | 9 +++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/AnalyzeView/AnalyzeView.qml b/src/AnalyzeView/AnalyzeView.qml index 43905e2..6741d36 100644 --- a/src/AnalyzeView/AnalyzeView.qml +++ b/src/AnalyzeView/AnalyzeView.qml @@ -42,10 +42,6 @@ Rectangle { LogDownloadController { id: logController - } - - MavlinkConsoleController { - id: conController } QGCFlickable { diff --git a/src/AnalyzeView/MavlinkConsolePage.qml b/src/AnalyzeView/MavlinkConsolePage.qml index 32d5c95..42d9460 100644 --- a/src/AnalyzeView/MavlinkConsolePage.qml +++ b/src/AnalyzeView/MavlinkConsolePage.qml @@ -28,6 +28,10 @@ AnalyzePage { property bool isLoaded: false + MavlinkConsoleController { + id: conController + } + Component { id: pageComponent @@ -90,6 +94,7 @@ AnalyzePage { id: command Layout.fillWidth: true placeholderText: "Enter Commands here..." + inputMethodHints: Qt.ImhNoAutoUppercase function sendCommand() { conController.sendCommand(text) @@ -98,10 +103,10 @@ AnalyzePage { onAccepted: sendCommand() Keys.onPressed: { - if (event.key == Qt.Key_Up) { + if (event.key === Qt.Key_Up) { text = conController.historyUp(text); event.accepted = true; - } else if (event.key == Qt.Key_Down) { + } else if (event.key === Qt.Key_Down) { text = conController.historyDown(text); event.accepted = true; }