diff --git a/src/AutoPilotPlugins/PX4/SafetyComponent.qml b/src/AutoPilotPlugins/PX4/SafetyComponent.qml index 59e07288bc75c987089d7e473819671ab4fdf94d..4b9e00dca7d2753cbce925dd1066d3e58c61dc9c 100644 --- a/src/AutoPilotPlugins/PX4/SafetyComponent.qml +++ b/src/AutoPilotPlugins/PX4/SafetyComponent.qml @@ -167,10 +167,10 @@ SetupPage { columns: 3 Image { - mipmap: true - fillMode: Image.PreserveAspectFit - source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/LowBatteryLight.svg" : "/qmlimages/LowBattery.svg" - Layout.rowSpan: 3 + mipmap: true + fillMode: Image.PreserveAspectFit + source: qgcPal.globalTheme === qgcPal.Light ? "/qmlimages/LowBatteryLight.svg" : "/qmlimages/LowBattery.svg" + Layout.rowSpan: 4 Layout.maximumWidth: _imageWidth Layout.maximumHeight: _imageHeight width: _imageWidth @@ -204,6 +204,15 @@ SetupPage { fact: controller.getParameterFact(-1, "BAT_CRIT_THR") Layout.minimumWidth: _editFieldWidth } + + QGCLabel { + text: qsTr("Battery Emergency Level:") + Layout.fillWidth: true + } + FactTextField { + fact: controller.getParameterFact(-1, "BAT_EMERGEN_THR") + Layout.minimumWidth: _editFieldWidth + } } Item { width: 1; height: _margins; Layout.columnSpan: 3 } diff --git a/src/FlightMap/MapItems/MissionItemIndicatorDrag.qml b/src/FlightMap/MapItems/MissionItemIndicatorDrag.qml index 7b9c4a12b31f3b8bf347e1bac7033eed9794aad0..720e5fd25e281c49c469b50a80d9bd75a7d264a4 100644 --- a/src/FlightMap/MapItems/MissionItemIndicatorDrag.qml +++ b/src/FlightMap/MapItems/MissionItemIndicatorDrag.qml @@ -71,11 +71,15 @@ Rectangle { drag.maximumY: itemDragger.parent.height - parent.height preventStealing: true - onClicked: itemDragger.clicked() + onClicked: { + focus = true + itemDragger.clicked() + } property bool dragActive: drag.active onDragActiveChanged: { if (dragActive) { + focus = true if (!_dragStartSignalled) { _dragStartSignalled = true dragStart() diff --git a/src/PlanView/SurveyItemEditor.qml b/src/PlanView/SurveyItemEditor.qml index 8b438dd7421d97644d9a19e189bda3b37dce7718..58fad1c1e11da3041c653ee2d49faf9f3a57185b 100644 --- a/src/PlanView/SurveyItemEditor.qml +++ b/src/PlanView/SurveyItemEditor.qml @@ -409,7 +409,7 @@ Rectangle { FactCheckBox { text: qsTr("Take images in turnarounds") fact: missionItem.cameraTriggerInTurnaround - enabled: !missionItem.hoverAndCapture.rawValue + enabled: missionItem.hoverAndCaptureAllowed ? !missionItem.hoverAndCapture.rawValue : true } SectionHeader { @@ -605,7 +605,7 @@ Rectangle { FactCheckBox { text: qsTr("Take images in turnarounds") fact: missionItem.cameraTriggerInTurnaround - enabled: !missionItem.hoverAndCapture.rawValue + enabled: missionItem.hoverAndCaptureAllowed ? !missionItem.hoverAndCapture.rawValue : true Layout.columnSpan: 2 } diff --git a/src/QmlControls/MissionItemIndexLabel.qml b/src/QmlControls/MissionItemIndexLabel.qml index 1393a35994a0ea1c8a7883056347256e308cd0d0..5b0e662f5951b5b58600c406e5a6e7ab6b94e292 100644 --- a/src/QmlControls/MissionItemIndexLabel.qml +++ b/src/QmlControls/MissionItemIndexLabel.qml @@ -116,6 +116,9 @@ Canvas { QGCMouseArea { fillItem: parent - onClicked: parent.clicked() + onClicked: { + focus = true + parent.clicked() + } } } diff --git a/src/VehicleSetup/FirmwareUpgradeController.cc b/src/VehicleSetup/FirmwareUpgradeController.cc index cbf9336f7e39691d1e6f35590d96fe2a3eda13f4..f417e86ab20abd946667b818eba8579507a818df 100644 --- a/src/VehicleSetup/FirmwareUpgradeController.cc +++ b/src/VehicleSetup/FirmwareUpgradeController.cc @@ -301,24 +301,6 @@ void FirmwareUpgradeController::_initFirmwareHash() { AutoPilotStackAPM, DeveloperFirmware, RoverFirmware, "http://gumstix-aerocore.s3.amazonaws.com/Rover/latest/PX4/APMrover2-v2.px4"} }; - /////////////////////////////// FMUV1 firmwares /////////////////////////////////////////// - FirmwareToUrlElement_t rgPX4FMUV1FirmwareArray[] = { - { AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/px4fmu-v1_default.px4"}, - { AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/px4fmu-v1_default.px4"}, - { AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/px4fmu-v1_default.px4"}, - { AutoPilotStackAPM, StableFirmware, CopterFirmware, "http://firmware.ardupilot.org/Copter/stable/PX4/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, StableFirmware, HeliFirmware, "http://firmware.ardupilot.org/Copter/stable/PX4-heli/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, StableFirmware, PlaneFirmware, "http://firmware.ardupilot.org/Plane/stable/PX4/ArduPlane-v1.px4"}, - { AutoPilotStackAPM, StableFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/stable/PX4/APMrover2-v1.px4"}, - { AutoPilotStackAPM, BetaFirmware, CopterFirmware, "http://firmware.ardupilot.org/Copter/beta/PX4/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, BetaFirmware, HeliFirmware, "http://firmware.ardupilot.org/Copter/beta/PX4-heli/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, BetaFirmware, PlaneFirmware, "http://firmware.ardupilot.org/Plane/beta/PX4/ArduPlane-v1.px4"}, - { AutoPilotStackAPM, BetaFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/beta/PX4/APMrover2-v1.px4"}, - { AutoPilotStackAPM, DeveloperFirmware, CopterFirmware, "http://firmware.ardupilot.org/Copter/latest/PX4/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, DeveloperFirmware, HeliFirmware, "http://firmware.ardupilot.org/Copter/latest/PX4-heli/ArduCopter-v1.px4"}, - { AutoPilotStackAPM, DeveloperFirmware, PlaneFirmware, "http://firmware.ardupilot.org/Plane/latest/PX4/ArduPlane-v1.px4"}, - { AutoPilotStackAPM, DeveloperFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v1.px4"} - }; //////////////////////////////////// AUAVX2_1 firmwares ////////////////////////////////////////////////// FirmwareToUrlElement_t rgAUAVX2_1FirmwareArray[] = { { AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/auav-x21_default.px4"}, @@ -414,12 +396,6 @@ void FirmwareUpgradeController::_initFirmwareHash() _rgAeroCoreFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url); } - size = sizeof(rgPX4FMUV1FirmwareArray)/sizeof(rgPX4FMUV1FirmwareArray[0]); - for (int i = 0; i < size; i++) { - const FirmwareToUrlElement_t& element = rgPX4FMUV1FirmwareArray[i]; - _rgPX4FMUV1Firmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url); - } - size = sizeof(rgAUAVX2_1FirmwareArray)/sizeof(rgAUAVX2_1FirmwareArray[0]); for (int i = 0; i < size; i++) { const FirmwareToUrlElement_t& element = rgAUAVX2_1FirmwareArray[i]; @@ -479,8 +455,6 @@ void FirmwareUpgradeController::_bootloaderSyncFailed(void) QHash* FirmwareUpgradeController::_firmwareHashForBoardId(int boardId) { switch (boardId) { - case Bootloader::boardIDPX4FMUV1: - return &_rgPX4FMUV1Firmware; case Bootloader::boardIDPX4Flow: return &_rgPX4FLowFirmware; case Bootloader::boardIDPX4FMUV2: diff --git a/src/VehicleSetup/FirmwareUpgradeController.h b/src/VehicleSetup/FirmwareUpgradeController.h index 139727f16a1f43d78e19ec096a56caf3f31a7996..80b1d563208543e6a6a4d1820a8defb42e11aaa2 100644 --- a/src/VehicleSetup/FirmwareUpgradeController.h +++ b/src/VehicleSetup/FirmwareUpgradeController.h @@ -206,7 +206,6 @@ private: QHash _rgPX4FMUV3Firmware; QHash _rgPX4FMUV2Firmware; QHash _rgAeroCoreFirmware; - QHash _rgPX4FMUV1Firmware; QHash _rgAUAVX2_1Firmware; QHash _rgMindPXFMUV2Firmware; QHash _rgTAPV1Firmware; diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml index a4360b72fab2060b6971d52d5e22dac224c2be99..5f0c4265d0ad54d6ff0a120376ec61e3a621a8fb 100644 --- a/src/ui/preferences/GeneralSettings.qml +++ b/src/ui/preferences/GeneralSettings.qml @@ -41,6 +41,9 @@ QGCView { property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 30 property Fact _mapProvider: QGroundControl.settingsManager.flightMapSettings.mapProvider property Fact _mapType: QGroundControl.settingsManager.flightMapSettings.mapType + property real _panelWidth: _qgcView.width * _internalWidthRatio + + readonly property real _internalWidthRatio: 0.8 readonly property string _requiresRestart: qsTr("(Requires Restart)") @@ -63,7 +66,7 @@ QGCView { //----------------------------------------------------------------- //-- Units Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: unitLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -76,7 +79,7 @@ QGCView { } Rectangle { height: unitsCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -115,7 +118,7 @@ QGCView { //----------------------------------------------------------------- //-- Miscellaneous Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: miscLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -128,7 +131,7 @@ QGCView { } Rectangle { height: miscCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -359,7 +362,7 @@ QGCView { //----------------------------------------------------------------- //-- Save path - Row { + RowLayout { spacing: ScreenTools.defaultFontPixelWidth visible: _savePath.visible && !ScreenTools.isMobile @@ -368,8 +371,10 @@ QGCView { text: qsTr("File Save Path:") } QGCLabel { - anchors.baseline: savePathBrowse.baseline - text: _savePath.rawValue === "" ? qsTr("") : _savePath.value + anchors.baseline: savePathBrowse.baseline + Layout.maximumWidth: _panelWidth * 0.5 + elide: Text.ElideMiddle + text: _savePath.rawValue === "" ? qsTr("") : _savePath.value } QGCButton { id: savePathBrowse @@ -394,7 +399,7 @@ QGCView { //----------------------------------------------------------------- //-- RTK GPS Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: unitLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -407,7 +412,7 @@ QGCView { } Rectangle { height: rtkGrid.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -438,7 +443,7 @@ QGCView { //----------------------------------------------------------------- //-- Autoconnect settings Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: autoConnectLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -451,7 +456,7 @@ QGCView { } Rectangle { height: autoConnectCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -490,7 +495,7 @@ QGCView { //----------------------------------------------------------------- //-- Video Source Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: videoLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -503,7 +508,7 @@ QGCView { } Rectangle { height: videoCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -605,7 +610,7 @@ QGCView { //----------------------------------------------------------------- //-- Video Source Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: videoRecLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -618,7 +623,7 @@ QGCView { } Rectangle { height: videoRecCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -676,7 +681,7 @@ QGCView { //----------------------------------------------------------------- //-- Custom Brand Image Item { - width: _qgcView.width * 0.8 + width: _panelWidth height: userBrandImageLabel.height anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter @@ -689,7 +694,7 @@ QGCView { } Rectangle { height: userBrandImageCol.height + (ScreenTools.defaultFontPixelHeight * 2) - width: _qgcView.width * 0.8 + width: _panelWidth color: qgcPal.windowShade anchors.margins: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter