diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index dd1d0292eebdb56026d4d2f5b34200288c1ea929..a9b96f3a814d028e0e0ff2ee9ad5685c472c1951 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -716,7 +716,7 @@ QGCView { height: 1.75*ScreenTools.defaultFontPixelHeight QGCLabel { - text: _activeVehicle ? qsTr("Pre-flight checklist")+" (MAV ID:"+_activeVehicle.id+")" : qsTr("Pre-flight checklist (no vehicle)") + text: _activeVehicle ? qsTr("Pre-Flight Checklist") : qsTr("Pre-flight checklist (no vehicle)") anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter font.pointSize: ScreenTools.mediumFontPointSize @@ -727,7 +727,7 @@ QGCView { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter opacity : 0.2+0.8*(QGroundControl.multiVehicleManager.vehicles.count > 0) - tooltip: "Reset the checklist (e.g. after a vehicle reboot)" + tooltip: qsTr("Reset the checklist (e.g. after a vehicle reboot)") onClicked: preFlightCheckList.resetNrClicks() diff --git a/src/FlightDisplay/PreFlightBatteryCheck.qml b/src/FlightDisplay/PreFlightBatteryCheck.qml index e95840c0fff7f3cc2cd199a8fe79b287eb2be751..dd458207a645353eb1bd0548a5ef61f8a3e1a6ba 100644 --- a/src/FlightDisplay/PreFlightBatteryCheck.qml +++ b/src/FlightDisplay/PreFlightBatteryCheck.qml @@ -16,7 +16,7 @@ import QGroundControl.Vehicle 1.0 // This class stores the data and functions of the check list but NOT the GUI (which is handled somewhere else). PreFlightCheckButton { name: qsTr("Battery") - pendingtext: qsTr("Healthy & charged > %1. Battery connector firmly plugged?").arg(failureVoltage) + pendingText: qsTr("Healthy & charged > %1. Battery connector firmly plugged?").arg(failureVoltage) property int failureVoltage: 40 @@ -35,10 +35,10 @@ PreFlightCheckButton { state = stateNotChecked } else { if (_unhealthySensors & Vehicle.SysStatusSensorBattery) { - failuretext = qsTr("Not healthy. Check console.") + failureText = qsTr("Not healthy. Check console.") state = stateMajorIssue } else if (_batPercentRemaining < failureVoltage) { - failuretext = qsTr("Low (below %1). Please recharge.").arg(failureVoltage) + failureText = qsTr("Low (below %1). Please recharge.").arg(failureVoltage) state = stateMajorIssue } else { state = _nrClicked > 0 ? statePassed : statePending diff --git a/src/FlightDisplay/PreFlightCheckList.qml b/src/FlightDisplay/PreFlightCheckList.qml index 61ba21b7e44901cc142ad7adb0e6b3b4a7677593..e25d37ef16f1b407a668c8a255b83b4d1cb5eec6 100644 --- a/src/FlightDisplay/PreFlightCheckList.qml +++ b/src/FlightDisplay/PreFlightCheckList.qml @@ -45,7 +45,7 @@ Item { PreFlightCheckButton { id: buttonHardware name: "Hardware" - defaulttext: "Props mounted? Wings secured? Tail secured?" + defaultText: "Props mounted? Wings secured? Tail secured?" } PreFlightBatteryCheck { id: buttonBattery @@ -67,19 +67,19 @@ Item { id: buttonActuators name: "Actuators" group: 1 - defaulttext: "Move all control surfaces. Did they work properly?" + defaultText: "Move all control surfaces. Did they work properly?" } PreFlightCheckButton { id: buttonMotors name: "Motors" group: 1 - defaulttext: "Propellers free? Then throttle up gently. Working properly?" + defaultText: "Propellers free? Then throttle up gently. Working properly?" } PreFlightCheckButton { id: buttonMission name: "Mission" group: 1 - defaulttext: "Please confirm mission is valid (waypoints valid, no terrain collision)." + defaultText: "Please confirm mission is valid (waypoints valid, no terrain collision)." } PreFlightSoundCheck { id: buttonSoundOutput @@ -92,21 +92,21 @@ Item { id: buttonPayload name: "Payload" group: 2 - defaulttext: "Configured and started?" - pendingtext: "Payload lid closed?" + defaultText: "Configured and started?" + pendingText: "Payload lid closed?" } PreFlightCheckButton { id: buttonWeather name: "Wind & weather" group: 2 - defaulttext: "OK for your platform?" - pendingtext: "Launching into the wind?" + defaultText: "OK for your platform?" + pendingText: "Launching into the wind?" } PreFlightCheckButton { id: buttonFlightAreaFree name: "Flight area" group: 2 - defaulttext: "Launch area and path free of obstacles/people?" + defaultText: "Launch area and path free of obstacles/people?" } } // Object Model } diff --git a/src/FlightDisplay/PreFlightRCCheck.qml b/src/FlightDisplay/PreFlightRCCheck.qml index a6c77b691b017a11ab00f2e852698999243bcbb3..84b90a43f816b82b1eefedc9eddf14c931e13e96 100644 --- a/src/FlightDisplay/PreFlightRCCheck.qml +++ b/src/FlightDisplay/PreFlightRCCheck.qml @@ -15,8 +15,8 @@ import QGroundControl.Vehicle 1.0 PreFlightCheckButton { name: qsTr("Radio Control") - pendingtext: qsTr("Receiving signal. Perform range test & confirm.") - failuretext: qsTr("No signal or invalid autopilot-RC config. Check RC and console.") + pendingText: qsTr("Receiving signal. Perform range test & confirm.") + failureText: qsTr("No signal or invalid autopilot-RC config. Check RC and console.") property int _unhealthySensors: _activeVehicle ? _activeVehicle.sensorsUnhealthyBits : 0 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle diff --git a/src/FlightDisplay/PreFlightSensorsCheck.qml b/src/FlightDisplay/PreFlightSensorsCheck.qml index 79b39ae0b7da9de3a3d31de976bcac5491b7e2e9..7b8264f08f21d96e05e7debc3d37634b690d1c30 100644 --- a/src/FlightDisplay/PreFlightSensorsCheck.qml +++ b/src/FlightDisplay/PreFlightSensorsCheck.qml @@ -16,11 +16,22 @@ import QGroundControl.Vehicle 1.0 PreFlightCheckButton { name: qsTr("Sensors") + property int failureSatCount: -1 ///< -1 indicates no sat count check + property int _unhealthySensors: _activeVehicle ? _activeVehicle.sensorsUnhealthyBits : 0 - property bool _gpsLock: _activeVehicle ? _activeVehicle.gps.lock.rawValue>=3 : 0 + property bool _gpsLock: _activeVehicle ? _activeVehicle.gps.lock.rawValue >= 3 : 0 + property bool _satCount: _activeVehicle ? _activeVehicle.gps.count : 0 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle + property int _allCheckedSensors: Vehicle.SysStatusSensor3dMag | + Vehicle.SysStatusSensor3dAccel | + Vehicle.SysStatusSensor3dGyro | + Vehicle.SysStatusSensorAbsolutePressure | + Vehicle.SysStatusSensorDifferentialPressure | + Vehicle.SysStatusSensorGPS + on_GpsLockChanged: updateItem() + on_SatCountChanged: updateItem() on_UnhealthySensorsChanged: updateItem() on_ActiveVehicleChanged: updateItem() @@ -30,25 +41,23 @@ PreFlightCheckButton { if (!_activeVehicle) { state = stateNotChecked } else { - if(!(_unhealthySensors & Vehicle.SysStatusSensor3dMag) && - !(_unhealthySensors & Vehicle.SysStatusSensor3dAccel) && - !(_unhealthySensors & Vehicle.SysStatusSensor3dGyro) && - !(_unhealthySensors & Vehicle.SysStatusSensorAbsolutePressure) && - !(_unhealthySensors & Vehicle.SysStatusSensorDifferentialPressure) && - !(_unhealthySensors & Vehicle.SysStatusSensorGPS)) { + if(!(_unhealthySensors & _allCheckedSensors)) { if (!_gpsLock) { - pendingtext = qsTr("Pending. Waiting for GPS lock.") + pendingText = qsTr("Pending. Waiting for GPS lock.") + state = statePending + } else if (failureSatCount !== -1 && _satCount <= failureSatCount) { + pendingText = qsTr("Pending. Waiting for Sat Count > %1.").arg(failureSatCount) state = statePending } else { state = statePassed } } else { - if (_unhealthySensors & Vehicle.SysStatusSensor3dMag) failuretext=qsTr("Failure. Magnetometer issues. Check console.") - else if(_unhealthySensors & Vehicle.SysStatusSensor3dAccel) failuretext=qsTr("Failure. Accelerometer issues. Check console.") - else if(_unhealthySensors & Vehicle.SysStatusSensor3dGyro) failuretext=qsTr("Failure. Gyroscope issues. Check console.") - else if(_unhealthySensors & Vehicle.SysStatusSensorAbsolutePressure) failuretext=qsTr("Failure. Barometer issues. Check console.") - else if(_unhealthySensors & Vehicle.SysStatusSensorDifferentialPressure) failuretext=qsTr("Failure. Airspeed sensor issues. Check console.") - else if(_unhealthySensors & Vehicle.SysStatusSensorGPS) failuretext=qsTr("Failure. No valid or low quality GPS signal. Check console.") + if (_unhealthySensors & Vehicle.SysStatusSensor3dMag) failureText=qsTr("Failure. Magnetometer issues. Check console.") + else if(_unhealthySensors & Vehicle.SysStatusSensor3dAccel) failureText=qsTr("Failure. Accelerometer issues. Check console.") + else if(_unhealthySensors & Vehicle.SysStatusSensor3dGyro) failureText=qsTr("Failure. Gyroscope issues. Check console.") + else if(_unhealthySensors & Vehicle.SysStatusSensorAbsolutePressure) failureText=qsTr("Failure. Barometer issues. Check console.") + else if(_unhealthySensors & Vehicle.SysStatusSensorDifferentialPressure) failureText=qsTr("Failure. Airspeed sensor issues. Check console.") + else if(_unhealthySensors & Vehicle.SysStatusSensorGPS) failureText=qsTr("Failure. No valid or low quality GPS signal. Check console.") state = stateMajorIssue } } diff --git a/src/FlightDisplay/PreFlightSoundCheck.qml b/src/FlightDisplay/PreFlightSoundCheck.qml index 2a6e4d382a359a5c1ab9455ac456036672c53bc4..32f7ce564678ae4ac40453f088bb01fb7f591a3f 100644 --- a/src/FlightDisplay/PreFlightSoundCheck.qml +++ b/src/FlightDisplay/PreFlightSoundCheck.qml @@ -15,8 +15,8 @@ import QGroundControl.Vehicle 1.0 PreFlightCheckButton { name: qsTr("Sound output") - pendingtext: qsTr("QGC audio output enabled. System audio output enabled, too?") - failuretext: qsTr("Failure, QGC audio output is disabled. Please enable it under application settings->general to hear audio warnings!") + pendingText: qsTr("QGC audio output enabled. System audio output enabled, too?") + failureText: qsTr("Failure, QGC audio output is disabled. Please enable it under application settings->general to hear audio warnings!") property bool _audioMuted: QGroundControl.settingsManager.appSettings.audioMuted.rawValue property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle diff --git a/src/QmlControls/DropPanel.qml b/src/QmlControls/DropPanel.qml index 66b331f5623456103c40c307d563a3c72cc8a36f..f59fc2dc27cba39299c11494804f720b6445e969 100644 --- a/src/QmlControls/DropPanel.qml +++ b/src/QmlControls/DropPanel.qml @@ -120,6 +120,10 @@ Item { Item { id: dropDownItem + DeadMouseArea { + anchors.fill: parent + } + Canvas { id: arrowCanvas anchors.fill: parent @@ -161,5 +165,6 @@ Item { property var dropPanel: _root } } + } // Item - dropDownItem } diff --git a/src/QmlControls/PreFlightCheckButton.qml b/src/QmlControls/PreFlightCheckButton.qml index e9c4e263fd0a7b6ea3848a5645c8aca2a0bd1d18..7bccb656706bca552bb7c0a5f019a164c9ea78ea 100644 --- a/src/QmlControls/PreFlightCheckButton.qml +++ b/src/QmlControls/PreFlightCheckButton.qml @@ -18,9 +18,9 @@ import QGroundControl.ScreenTools 1.0 QGCButton { property string name: "" property int group: 0 - property string defaulttext: qsTr("Not checked yet") - property string pendingtext: "" - property string failuretext: qsTr("Failure. Check console.") + property string defaultText: qsTr("Not checked yet") + property string pendingText: "" + property string failureText: qsTr("Failure. Check console.") property int state: stateNotChecked readonly property int stateNotChecked: 0 @@ -31,7 +31,7 @@ QGCButton { property var _color: qgcPal.button property int _nrClicked: 0 - property string _text: name + ": " + defaulttext + property string _text: name + ": " + defaultText property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle enabled: (!_activeVehicle || _activeVehicle.connectionLost) ? false : preFlightCheckList._checkState >= group @@ -48,8 +48,8 @@ QGCButton { } } - onPendingtextChanged: { if (state === statePending) { getTextFromState(); getColorFromState(); } } - onFailuretextChanged: { if (state === stateMajorIssue) { getTextFromState(); getColorFromState(); } } + onPendingTextChanged: { if (state === statePending) { getTextFromState(); getColorFromState(); } } + onFailureTextChanged: { if (state === stateMajorIssue) { getTextFromState(); getColorFromState(); } } onStateChanged: { getTextFromState(); getColorFromState(); } onClicked: { if (state <= statePending) { @@ -60,12 +60,12 @@ QGCButton { function updateItem() { // This is the default updateFunction. It assumes the item is a MANUAL check list item, i.e. one that - // only requires user clicks (one click if pendingtext="", two clicks otherwise) for completion. + // only requires user clicks (one click if pendingText="", two clicks otherwise) for completion. if (_nrClicked === 0) { state = stateNotChecked } else if (_nrClicked === 1) { - if (pendingtext.length === 0) { + if (pendingText.length === 0) { state = statePassed } else { state = statePending @@ -80,13 +80,13 @@ QGCButton { function getTextFromState() { if (state === stateNotChecked) { - _text = qsTr(name) + ": " + qsTr(defaulttext) + _text = qsTr(name) + ": " + qsTr(defaultText) } else if (state === statePending) { - _text = ""+qsTr(name)+"" +": " + pendingtext + _text = ""+qsTr(name)+"" +": " + pendingText } else if (state === stateMinorIssue) { _text = ""+qsTr(name)+"" +": " + qsTr("Minor problem") } else if (state === stateMajorIssue) { - _text = ""+qsTr(name)+"" +": " + failuretext + _text = ""+qsTr(name)+"" +": " + failureText } else if (state === statePassed) { _text = ""+qsTr(name)+"" +": " + qsTr("OK") } else {