diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index 60d0c4147fa2d9d072822f351cb1012bd2f3ef7c..0b671737dedc969a72126cd4313faab619a3db20 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -62,7 +62,6 @@ SetupPage { property bool _defaultFirmwareIsPX4: true property string firmwareWarningMessage - property bool controllerCompleted: false property bool initialBoardSearch: true property string firmwareName @@ -76,6 +75,11 @@ SetupPage { QGCPalette { id: qgcPal; colorGroupEnabled: true } + onSetupPageCompleted: { + controller.startBoardSearch() + _defaultFirmwareIsPX4 = _defaultFirmwareFact.rawValue === _defaultFimwareTypePX4 // we don't want this to be bound and change as radios are selected + } + FirmwareUpgradeController { id: controller progressBar: progressBar @@ -83,11 +87,6 @@ SetupPage { property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle - Component.onCompleted: { - controllerCompleted = true - controller.startBoardSearch() - } - onActiveVehicleChanged: { if (!activeVehicle) { statusTextArea.append(plugInText) @@ -129,14 +128,6 @@ SetupPage { } } - Component.onCompleted: { - if (controllerCompleted) { - // We can only start the board search when the Qml and Controller are completely done loading - controller.startBoardSearch() - } - _defaultFirmwareIsPX4 = _defaultFirmwareFact.rawValue === _defaultFimwareTypePX4 // we don't want this to be bound and change as radios are selected - } - Component { id: pixhawkFirmwareSelectDialogComponent diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index 45d990f4d331015aede427fbd69af297330fbf8e..6d19b594bc3d249025f92b01465a5f77c2d39a69 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -46,34 +46,20 @@ SetupPage { width: availableWidth height: Math.max(leftColumn.height, rightColumn.height) - property bool controllerCompleted: false - property bool controllerAndViewReady: false - readonly property real labelToMonitorMargin: ScreenTools.defaultFontPixelWidth * 3 property var _activeJoystick: joystickManager.activeJoystick + onSetupPageCompleted: { + controller.start() + } + JoystickConfigController { id: controller statusText: statusText cancelButton: cancelButton nextButton: nextButton skipButton: skipButton - - Component.onCompleted: { - controllerCompleted = true - if (joystickPage.completedSignalled) { - controllerAndViewReady = true - controller.start() - } - } - } - - Component.onCompleted: { - if (controllerCompleted) { - controllerAndViewReady = true - controller.start() - } } // Live axis monitor control component