diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index 21111ee5165a8ab3429496f67938d2e2a41713fd..74bef1eb3a81e1aee68b09027d8c9b149fe38256 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -189,7 +189,6 @@ SetupPage { } function accept() { - hideDialog() if (_singleFirmwareMode) { controller.flashSingleFirmwareMode(controller.selectedFirmwareBuildType) } else { @@ -210,13 +209,18 @@ SetupPage { // Not ready yet, or no firmware available return } + var firmwareUrl = controller.apmFirmwareUrls[ardupilotFirmwareSelectionCombo.currentIndex] + if (firmwareUrl == "") { + return + } controller.flashFirmwareUrl(controller.apmFirmwareUrls[ardupilotFirmwareSelectionCombo.currentIndex]) + hideDialog() return } } } - controller.flash(stack, firmwareBuildType, vehicleType) + hideDialog() } }