From 83d205c745818cdaca3459ac39073442d8c2058d Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Tue, 27 Jun 2017 13:47:48 -0700 Subject: [PATCH] RTK Indicator updates --- qgcresources.qrc | 1 + src/QmlControls/QGroundControlQmlGlobal.cc | 2 +- src/Vehicle/GPSRTKFact.json | 4 +- src/ui/toolbar/GPSRTKIndicator.qml | 10 +-- src/ui/toolbar/Images/RTK.svg | 80 ++++++++++++++++++++++ 5 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 src/ui/toolbar/Images/RTK.svg diff --git a/qgcresources.qrc b/qgcresources.qrc index 4e2602e2c..4abea6ec7 100644 --- a/qgcresources.qrc +++ b/qgcresources.qrc @@ -139,6 +139,7 @@ src/ui/toolbar/Images/Gears.svg src/ui/toolbar/Images/Analyze.svg src/ui/toolbar/Images/Gps.svg + src/ui/toolbar/Images/RTK.svg src/ui/toolbar/Images/Hamburger.svg src/ui/toolbar/Images/Megaphone.svg src/ui/toolbar/Images/PaperPlane.svg diff --git a/src/QmlControls/QGroundControlQmlGlobal.cc b/src/QmlControls/QGroundControlQmlGlobal.cc index 3fea67ba4..b4875992b 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.cc +++ b/src/QmlControls/QGroundControlQmlGlobal.cc @@ -252,7 +252,7 @@ void QGroundControlQmlGlobal::_onGPSDisconnect() void QGroundControlQmlGlobal::_GPSSurveyInStatus(float duration, float accuracyMM, bool valid, bool active) { _gpsRtkFactGroup.currentDuration()->setRawValue(duration); - _gpsRtkFactGroup.currentAccuracy()->setRawValue(accuracyMM); + _gpsRtkFactGroup.currentAccuracy()->setRawValue(accuracyMM/1000.0); _gpsRtkFactGroup.valid()->setRawValue(valid); _gpsRtkFactGroup.active()->setRawValue(active); } diff --git a/src/Vehicle/GPSRTKFact.json b/src/Vehicle/GPSRTKFact.json index 306781373..12b26709a 100644 --- a/src/Vehicle/GPSRTKFact.json +++ b/src/Vehicle/GPSRTKFact.json @@ -8,8 +8,8 @@ "name": "currentAccuracy", "shortDescription": "Current Accuracy", "type": "double", - "decimalPlaces": 0, - "units": "mm" + "decimalPlaces": 1, + "units": "m" }, { "name": "currentDuration", diff --git a/src/ui/toolbar/GPSRTKIndicator.qml b/src/ui/toolbar/GPSRTKIndicator.qml index 5f8dfc765..faf5f827c 100644 --- a/src/ui/toolbar/GPSRTKIndicator.qml +++ b/src/ui/toolbar/GPSRTKIndicator.qml @@ -71,7 +71,7 @@ Item { text: QGroundControl.gpsRtk.valid.value ? qsTr("Accuracy:") : qsTr("Current Accuracy:") } QGCLabel { - text: (QGroundControl.gpsRtk.currentAccuracy.value/1000).toFixed(1) + ' m' + text: QGroundControl.gpsRtk.currentAccuracy.valueString + " " + QGroundControl.appSettingsDistanceUnitsString } QGCLabel { text: qsTr("Satellites:") } QGCLabel { text: QGroundControl.gpsRtk.numSatellites.value } @@ -91,7 +91,7 @@ Item { width: height anchors.top: parent.top anchors.bottom: parent.bottom - source: "/qmlimages/Gps.svg" + source: "/qmlimages/RTK.svg" fillMode: Image.PreserveAspectFit sourceSize.height: height opacity: 1 @@ -109,12 +109,6 @@ Item { color: qgcPal.buttonText text: QGroundControl.gpsRtk.numSatellites.value } - - QGCLabel { - id: numSatValue - color: qgcPal.buttonText - text: qsTr("RTK") - } } MouseArea { diff --git a/src/ui/toolbar/Images/RTK.svg b/src/ui/toolbar/Images/RTK.svg new file mode 100644 index 000000000..7cd88967f --- /dev/null +++ b/src/ui/toolbar/Images/RTK.svg @@ -0,0 +1,80 @@ + + + + +GPS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.22.0