From fc652cbc815154bba56487d3bb49e5d102a72a29 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 29 Nov 2015 11:38:32 -0800 Subject: [PATCH] Update Firmware Upgrade to new inactive disconnect model --- src/VehicleSetup/FirmwareUpgrade.qml | 18 +++++++++++++++--- src/VehicleSetup/SetupView.qml | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index f99fa5c40..1111ff6b1 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -67,6 +67,8 @@ QGCView { progressBar: progressBar statusLog: statusTextArea + property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle + Component.onCompleted: { controllerCompleted = true if (qgcView.completedSignalled) { @@ -75,20 +77,30 @@ QGCView { } } + onActiveVehicleChanged: { + if (!activeVehicle) { + statusTextArea.append(plugInText) + } + } + onNoBoardFound: { initialBoardSearch = false - statusTextArea.append(plugInText) + if (!QGroundControl.multiVehicleManager.activeVehicleAvailable) { + statusTextArea.append(plugInText) + } } onBoardGone: { initialBoardSearch = false - statusTextArea.append(plugInText) + if (!QGroundControl.multiVehicleManager.activeVehicleAvailable) { + statusTextArea.append(plugInText) + } } onBoardFound: { if (initialBoardSearch) { // Board was found right away, so something is already plugged in before we've started upgrade - if (QGroundControl.linkManager.anyActiveLinks) { + if (QGroundControl.multiVehicleManager.activeVehicleAvailable) { statusTextArea.append(qgcDisconnectText) } else { statusTextArea.append(usbUnplugText.replace('{0}', controller.boardType)) diff --git a/src/VehicleSetup/SetupView.qml b/src/VehicleSetup/SetupView.qml index 097fe2971..03d4a730d 100644 --- a/src/VehicleSetup/SetupView.qml +++ b/src/VehicleSetup/SetupView.qml @@ -159,7 +159,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap font.pixelSize: ScreenTools.largeFontPixelSize - text: "Connect vehicle to your device and QGroundControl will automatically connect to it. Click Firmware on the left to upgrade your vehicle." + text: "Connect vehicle to your device and QGroundControl will automatically detect to it. Click Firmware on the left to upgrade your vehicle." onLinkActivated: Qt.openUrlExternally(link) } -- 2.22.0