Commit 4132f770 authored by Don Gagne's avatar Don Gagne

parent 0313a43f
...@@ -104,37 +104,51 @@ Item { ...@@ -104,37 +104,51 @@ Item {
} }
//-- Map warnings //-- Map warnings
Rectangle {
anchors.margins: -ScreenTools.defaultFontPixelHeight
anchors.fill: warningsCol
color: "white"
opacity: 0.5
radius: ScreenTools.defaultFontPixelWidth / 2
visible: warningsCol.noGPSLockVisible || warningsCol.prearmErrorVisible
}
Column { Column {
id: warningsCol
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.verticalCenter anchors.top: parent.verticalCenter
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
property bool noGPSLockVisible: _activeVehicle && !_activeVehicle.coordinate.isValid && _mainIsMap
property bool prearmErrorVisible: _activeVehicle && _activeVehicle.prearmError
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: _activeVehicle && !_activeVehicle.coordinate.isValid && _mainIsMap visible: warningsCol.noGPSLockVisible
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
color: mapPal.text color: "black"
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
text: qsTr("No GPS Lock for Vehicle") text: qsTr("No GPS Lock for Vehicle")
} }
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: _activeVehicle && _activeVehicle.prearmError visible: warningsCol.prearmErrorVisible
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
color: mapPal.text color: "black"
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
text: _activeVehicle ? _activeVehicle.prearmError : "" text: _activeVehicle ? _activeVehicle.prearmError : ""
} }
QGCLabel { QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
visible: _activeVehicle && _activeVehicle.prearmError visible: warningsCol.prearmErrorVisible
width: ScreenTools.defaultFontPixelWidth * 50 width: ScreenTools.defaultFontPixelWidth * 50
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
color: mapPal.text color: "black"
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
text: "The vehicle has failed a pre-arm check. In order to arm the vehicle, resolve the failure." text: "The vehicle has failed a pre-arm check. In order to arm the vehicle, resolve the failure."
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment