diff --git a/src/FlightMap/Widgets/InstrumentSwipeView.qml b/src/FlightMap/Widgets/InstrumentSwipeView.qml index 814b0b45a70de1a83fd6317999bdb8fcb7255665..fb1ca53950fc9ac67ef21c1673de9c5fd9081e59 100644 --- a/src/FlightMap/Widgets/InstrumentSwipeView.qml +++ b/src/FlightMap/Widgets/InstrumentSwipeView.qml @@ -41,6 +41,10 @@ Item { showPage(_currentPage) } + function currentPage() { + return _currentPage + } + MouseArea { anchors.fill: parent onClicked: showNextPage() diff --git a/src/FlightMap/Widgets/QGCInstrumentWidget.qml b/src/FlightMap/Widgets/QGCInstrumentWidget.qml index 15c7fade96814dad7cd93951a5e701d6f15af626..9aa79dfe18077648f0f7fd617cdbc4e362e7bf17 100644 --- a/src/FlightMap/Widgets/QGCInstrumentWidget.qml +++ b/src/FlightMap/Widgets/QGCInstrumentWidget.qml @@ -92,6 +92,37 @@ Rectangle { onClicked: _valuesWidget.showPicker() } } + + Image { + id: healthWarning + anchors.bottom: outerCompass.bottom + anchors.left: outerCompass.left + source: "/qmlimages/Yield.svg" + mipmap: true + visible: _activeVehicle ? !_warningsViewed && _activeVehicle.unhealthySensors.length > 0 && _valuesWidget.currentPage() != 2 : false + opacity: 0.8 + width: outerCompass.width * 0.15 + sourceSize.width: width + fillMode: Image.PreserveAspectFit + + property bool _warningsViewed: false + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onEntered: healthWarning.opacity = 1 + onExited: healthWarning.opacity = 0.8 + onClicked: { + _valuesWidget.showPage(2) + healthWarning._warningsViewed = true + } + } + + Connections { + target: _activeVehicle + onUnhealthySensorsChanged: healthWarning._warningsViewed = false + } + } } Rectangle { diff --git a/src/FlightMap/Widgets/VehicleHealthWidget.qml b/src/FlightMap/Widgets/VehicleHealthWidget.qml index 85eb212490a1fa1892ee298d1ac1870756f7d550..60834cf49bedb050d73c948e829176d60a8e93f4 100644 --- a/src/FlightMap/Widgets/VehicleHealthWidget.qml +++ b/src/FlightMap/Widgets/VehicleHealthWidget.qml @@ -27,13 +27,6 @@ QGCFlickable { property var unhealthySensors: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle.unhealthySensors : [ ] - // Any time the unhealthy sensors list changes, switch to the health page - onUnhealthySensorsChanged: { - if (unhealthySensors.length != 0) { - showPage(2) - } - } - MouseArea { anchors.fill: parent onClicked: showNextPage() diff --git a/src/FlightMap/Widgets/VibrationWidget.qml b/src/FlightMap/Widgets/VibrationWidget.qml index f5aeff5351714476ee630528ba9cee5d42cfbe1f..896d93a69efd963e5d280c2559d40c5ec2f0ce95 100644 --- a/src/FlightMap/Widgets/VibrationWidget.qml +++ b/src/FlightMap/Widgets/VibrationWidget.qml @@ -153,7 +153,7 @@ QGCFlickable { } QGCLabel { - text: qsTr("Accel 2: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "") + text: qsTr("Accel 3: ") + (_activeVehicle ? _activeVehicle.vibration.clipCount3.valueString : "") color: textColor } }