diff --git a/src/FlightDisplay/MultiVehicleList.qml b/src/FlightDisplay/MultiVehicleList.qml index cdb1b5cdff72c3c5fcdb421458d9d6b5a8fc2ddb..f8a7890a6f1e79d1a33b73ac0a16402e489002d3 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 a0a4769e3ef857d265019c9c67f0a8851ac03a5d..f3aee1c7174a5b77fac22551db7cae38db9c8837 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 }