diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 979c2f9836a914c5da5d0fb7a0a9ca3eff894fdb..8317d610867b5fcf1c5e4fd30d144cacf7466b02 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -190,16 +190,22 @@ Rectangle { function getGpsLockStatus() { if(activeVehicle) { - if(activeVehicle.satelliteLock == 0) { - return "No Satellite Link" - } - if(activeVehicle.satelliteLock == 1) { - return "No GPS Lock" + if(activeVehicle.satelliteLock < 2) { + return "No Satellite Lock" } if(activeVehicle.satelliteLock == 2) { return "2D Lock" } - return "3D Lock" + if(activeVehicle.satelliteLock == 3) { + return "3D Lock" + } + if(activeVehicle.satelliteLock == 4) { + return "3D Lock with Differential" + } + if(activeVehicle.satelliteLock == 5) { + return "3D Lock with Relative Positioning" + } + return "Unkown Lock Type (" + activeVehicle.satelliteLock + ")" } return "N/A" } @@ -226,14 +232,14 @@ Rectangle { anchors.centerIn: parent QGCLabel { id: gpsLabel - text: (activeVehicle && (activeVehicle.satelliteCount > 0)) ? "GPS Status" : "GPS Data Unavailable" + text: (activeVehicle && activeVehicle.satelliteCount >= 0) ? "GPS Status" : "GPS Data Unavailable" font.weight:Font.DemiBold color: colorWhite anchors.horizontalCenter: parent.horizontalCenter } GridLayout { id: gpsGrid - visible: (activeVehicle && (activeVehicle.satelliteCount > 0)) + visible: (activeVehicle && activeVehicle.satelliteCount >= 0) anchors.margins: ScreenTools.defaultFontPixelHeight columnSpacing: ScreenTools.defaultFontPixelWidth anchors.horizontalCenter: parent.horizontalCenter diff --git a/src/ui/toolbar/MainToolBarIndicators.qml b/src/ui/toolbar/MainToolBarIndicators.qml index e41927e489d08032177026886afe14d840f8c92e..96287ea0ee3d7780014b04de4e84675b58a9b8c8 100644 --- a/src/ui/toolbar/MainToolBarIndicators.qml +++ b/src/ui/toolbar/MainToolBarIndicators.qml @@ -176,7 +176,7 @@ Row { smooth: true width: mainWindow.tbCellHeight * 0.65 height: mainWindow.tbCellHeight * 0.5 - opacity: activeVehicle ? (activeVehicle.satelliteCount < 1 ? 0.5 : 1) : 0.5 + opacity: (activeVehicle && activeVehicle.satelliteCount >= 0) ? 1 : 0.5 anchors.verticalCenter: parent.verticalCenter } SignalStrength { @@ -186,10 +186,10 @@ Row { } } QGCLabel { - text: activeVehicle ? activeVehicle.satelliteCount : 0 + text: (activeVehicle && activeVehicle.satelliteCount >= 0) ? activeVehicle.satelliteCount : "" + visible: (activeVehicle && activeVehicle.satelliteCount >= 0) font.pixelSize: tbFontSmall color: colorWhite - opacity: activeVehicle ? (activeVehicle.satelliteCount < 1 ? 0.5 : 1) : 0.5 anchors.top: parent.top anchors.leftMargin: gpsIcon.width anchors.left: parent.left