|
|
|
@ -25,19 +25,6 @@ Row {
@@ -25,19 +25,6 @@ Row {
|
|
|
|
|
QGCPalette { id: qgcPal } |
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------- |
|
|
|
|
function getSatStrength(hdop) { |
|
|
|
|
if (hdop <= 1.0) |
|
|
|
|
return 100 |
|
|
|
|
if (hdop <= 1.4) |
|
|
|
|
return 75 |
|
|
|
|
if (hdop <= 1.8) |
|
|
|
|
return 50 |
|
|
|
|
if (hdop <= 3.0) |
|
|
|
|
return 25 |
|
|
|
|
return 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------- |
|
|
|
|
function getMessageColor() { |
|
|
|
|
if (activeVehicle) { |
|
|
|
|
if (activeVehicle.messageTypeNone) |
|
|
|
@ -130,38 +117,40 @@ Row {
@@ -130,38 +117,40 @@ Row {
|
|
|
|
|
//-- GPS Indicator |
|
|
|
|
Item { |
|
|
|
|
id: satelitte |
|
|
|
|
width: gpsRow.width * 1.1 |
|
|
|
|
width: (gpsValuesColumn.x + gpsValuesColumn.width) * 1.1 |
|
|
|
|
height: mainWindow.tbCellHeight |
|
|
|
|
Row { |
|
|
|
|
id: gpsRow |
|
|
|
|
height: parent.height |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCColoredImage { |
|
|
|
|
id: gpsIcon |
|
|
|
|
source: "/qmlimages/Gps.svg" |
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
width: mainWindow.tbCellHeight * 0.65 |
|
|
|
|
height: mainWindow.tbCellHeight * 0.5 |
|
|
|
|
sourceSize.height: height |
|
|
|
|
opacity: (activeVehicle && activeVehicle.gps.count.value >= 0) ? 1 : 0.5 |
|
|
|
|
color: qgcPal.buttonText |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
|
|
QGCColoredImage { |
|
|
|
|
id: gpsIcon |
|
|
|
|
source: "/qmlimages/Gps.svg" |
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
width: mainWindow.tbCellHeight * 0.65 |
|
|
|
|
height: mainWindow.tbCellHeight * 0.5 |
|
|
|
|
sourceSize.height: height |
|
|
|
|
opacity: (activeVehicle && activeVehicle.gps.count.value >= 0) ? 1 : 0.5 |
|
|
|
|
color: qgcPal.buttonText |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: gpsValuesColumn |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
anchors.left: gpsIcon.right |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) |
|
|
|
|
color: qgcPal.buttonText |
|
|
|
|
text: activeVehicle ? activeVehicle.gps.count.valueString : "" |
|
|
|
|
} |
|
|
|
|
SignalStrength { |
|
|
|
|
size: mainWindow.tbCellHeight * 0.5 |
|
|
|
|
percent: activeVehicle ? getSatStrength(activeVehicle.gps.hdop.value) : "" |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) |
|
|
|
|
color: qgcPal.buttonText |
|
|
|
|
text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(1) : "" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value) |
|
|
|
|
font.pointSize: ScreenTools.smallFontPointSize |
|
|
|
|
color: qgcPal.buttonText |
|
|
|
|
text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(1) : "" |
|
|
|
|
} |
|
|
|
|
} // Column |
|
|
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
anchors.fill: parent |
|
|
|
|
onClicked: { |
|
|
|
|