From df641b2363d912396e1359f4b751ad6bb937a136 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Wed, 10 May 2017 21:18:41 -0400 Subject: [PATCH 1/3] Don't switch views automatically on sensor health warning --- src/FlightMap/Widgets/VehicleHealthWidget.qml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/FlightMap/Widgets/VehicleHealthWidget.qml b/src/FlightMap/Widgets/VehicleHealthWidget.qml index 85eb212..60834cf 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() From 7b03fbcd3f3782eb8d42199d6a16a80778a06eff Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Wed, 10 May 2017 21:20:48 -0400 Subject: [PATCH 2/3] Alert user of sensor health error --- src/FlightMap/Widgets/InstrumentSwipeView.qml | 4 ++++ src/FlightMap/Widgets/QGCInstrumentWidget.qml | 31 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/FlightMap/Widgets/InstrumentSwipeView.qml b/src/FlightMap/Widgets/InstrumentSwipeView.qml index 814b0b4..fb1ca53 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 15c7fad..9aa79df 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 { From b25fa29cf543f4e08dc142cdb892cc26ed14dd69 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Fri, 12 May 2017 11:57:17 -0400 Subject: [PATCH 3/3] copy/paste typo --- src/FlightMap/Widgets/VibrationWidget.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FlightMap/Widgets/VibrationWidget.qml b/src/FlightMap/Widgets/VibrationWidget.qml index f5aeff5..896d93a 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 } }