From 076fa4632dc9a1eabf5130466c6aeb8daec86bc3 Mon Sep 17 00:00:00 2001 From: Pierre TILAK <pierre.tilak@aeronavics.com> Date: Fri, 16 Aug 2019 12:28:21 +1200 Subject: [PATCH] Hide Indicators in MultiVehicleList + Fix Fix : COGAngle indicator was shown everytime, fix isCOGAngleOK --- src/FlightDisplay/MultiVehicleList.qml | 1 + src/FlightMap/Widgets/QGCCompassWidget.qml | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FlightDisplay/MultiVehicleList.qml b/src/FlightDisplay/MultiVehicleList.qml index cdb1b5cdff..f8a7890a6f 100644 --- a/src/FlightDisplay/MultiVehicleList.qml +++ b/src/FlightDisplay/MultiVehicleList.qml @@ -135,6 +135,7 @@ Item { QGCCompassWidget { size: _widgetHeight + usedByMultipleVehicleList: true vehicle: _vehicle } diff --git a/src/FlightMap/Widgets/QGCCompassWidget.qml b/src/FlightMap/Widgets/QGCCompassWidget.qml index a0a4769e3e..f3aee1c717 100644 --- a/src/FlightMap/Widgets/QGCCompassWidget.qml +++ b/src/FlightMap/Widgets/QGCCompassWidget.qml @@ -40,16 +40,20 @@ Item { property real _headingToNextWP: vehicle ? vehicle.headingToNextWP.rawValue : 0 property real _courseOverGround:activeVehicle ? activeVehicle.gps.courseOverGround.rawValue : 0 + property bool usedByMultipleVehicleList: false + function isCOGAngleOK(){ - if(_groundSpeed < 0.5 && _showAdditionalIndicatorsCompass){ + if(_groundSpeed < 0.5){ return false } else{ - return vehicle + return vehicle && _showAdditionalIndicatorsCompass } } function isHeadingHomeOK(){ + console.log('isHeadingHomeOK',vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToHome)) + console.log('headingHome',_headingToHome) return vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToHome) } @@ -61,7 +65,7 @@ Item { return _lockNoseUpCompass } - readonly property bool _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass.value + readonly property bool _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass.value && !usedByMultipleVehicleList readonly property bool _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass.value QGCPalette { id: qgcPal; colorGroupEnabled: enabled } -- GitLab