diff --git a/modifications/ConnectServer.qml b/modifications/ConnectServer.qml index e9c219a5cc2f..f10217a9aeea 100644 --- a/modifications/ConnectServer.qml +++ b/modifications/ConnectServer.qml @@ -26,7 +26,6 @@ Rectangle{ font.pixelSize: myrect.width/50 anchors.centerIn: parent anchors.verticalCenterOffset: - myrect.height/10 - } Image { diff --git a/modifications/ConnectToServer.cc b/modifications/ConnectToServer.cc index 6c63660f787e..a6c3c2701535 100644 --- a/modifications/ConnectToServer.cc +++ b/modifications/ConnectToServer.cc @@ -9,6 +9,9 @@ ConnectToServer::ConnectToServer(QObject *parent) : QObject(parent) void ConnectToServer::slotTokenNotGenerated() { + QMessageBox Error; + Error.setText("Couldnt fetch token from management server please check your internet connection"); + Error.exec(); emit connectionNotSuccessful(); } diff --git a/modifications/NpntProcess.qml b/modifications/NpntProcess.qml index 0a637358dda2..eaeb17f571dd 100644 --- a/modifications/NpntProcess.qml +++ b/modifications/NpntProcess.qml @@ -75,6 +75,48 @@ import QGroundControl 1.0 indicator.height:rect1.height/20 } + Timer { + interval: 10000//10s + onTriggered: text1.visible = true + running: true + } + Text { + id:text1 + y:parent.height+100 + visible: false + text: (myrect.hardwareConnected?"":"Error:Failed To Connect Hardware") + font.pixelSize:(rect1.width/25 + rect1.height/25 )/2 + color: "red" + } + Timer { + interval: 14000//10s + onTriggered: text2.visible = true + running:(myrect.hardwareConnected?true:false) + + } + Text{ + id:text2 + y:parent.height+100 + visible: false + text: (myrect.droneIsActive?"":"Error:Drone is not active") + font.pixelSize:(rect1.width/25 + rect1.height/25)/2 + color: "red" + + } + Timer { + interval: 14000//10s + onTriggered: text3.visible = true + running:(!(myrect.hardwareConnected)?false:(myrect.droneIsActive?true:false)) + } + Text { + y:parent.height+100 + id:text3 + visible: false + text: (myrect.keyRotationCompleted?"":"Error:Unable to rotate key") + font.pixelSize:(rect1.width/25 + rect1.height/25)/2 + color: "red" + + } } diff --git a/src/Vehicle/FTPManager.h b/src/Vehicle/FTPManager.h index 973649402de9..b2e936a0ab54 100644 --- a/src/Vehicle/FTPManager.h +++ b/src/Vehicle/FTPManager.h @@ -77,7 +77,7 @@ private slots: uint32_t cBytesMissing; } MissingData_t; - typedef struct { + struct DownloadState_t{ uint8_t sessionId; uint32_t expectedOffset; ///< offset which should be coming next uint32_t bytesWritten; @@ -100,9 +100,9 @@ private slots: rgMissingData.clear(); file.close(); } - } DownloadState_t; + }; - typedef struct { + struct UploadState_t{ uint8_t sessionId; uint32_t expectedOffset; ///< offset which should be coming next uint32_t bytesWritten; @@ -125,7 +125,7 @@ private slots: rgMissingData.clear(); file.close(); } - } UploadState_t; + }; void _mavlinkMessageReceived (const mavlink_message_t& message); diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index d49e2b594b44..c771daf9e5f5 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT * @@ -886,7 +886,6 @@ void Vehicle::_handleStatusText(mavlink_message_t& message) break; } } - bool includesNullTerminator = messageText.length() < MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN; if (_chunkedStatusTextInfoMap.contains(compId) && _chunkedStatusTextInfoMap[compId].chunkId != statustext.id) {