diff --git a/artwork/Dials/PFD-2.svg b/artwork/Dials/PFD-2.svg index c3cc5f37f..39e1991b5 100644 --- a/artwork/Dials/PFD-2.svg +++ b/artwork/Dials/PFD-2.svg @@ -1555,9 +1555,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.979899" + inkscape:zoom="0.7" inkscape:cx="526.33034" - inkscape:cy="94.313426" + inkscape:cy="72.079247" inkscape:document-units="px" inkscape:current-layer="layer6" showgrid="false" @@ -3648,21 +3648,16 @@ x="810.57056" y="101.28067" style="fill:#ffffff;fill-opacity:1">1250m - - 100/10 + + + + + + + + getField(tdr); UAVObjectField* field3 = object1->getField(rdr); if (field && field2 && field3) { - QString s = field->getValue().toString(); + QString s = field->getValue().toString(); if (m_renderer->elementExists("gcstelemetry-" + s)) { gcsTelemetryArrow->setElementId("gcstelemetry-" + s); } else { // Safeguard gcsTelemetryArrow->setElementId("gcstelemetry-Disconnected"); } + double v1 = field2->getDouble(); + double v2 = field3->getDouble(); + s.sprintf("%.0f/%.0f",v1,v2); + gcsTelemetryStats->setPlainText(s); } else { std::cout << "UpdateLinkStatus: Wrong field, maybe an issue with object disconnection ?" << std::endl; } @@ -496,6 +500,18 @@ void PFDGadgetWidget::setDialFile(QString dfn) matrix.translate(startX,startY); gcsTelemetryArrow->setTransform(matrix,false); + compassMatrix = m_renderer->matrixForElement("linkrate"); + startX = compassMatrix.mapRect(m_renderer->boundsOnElement("linkrate")).x(); + startY = compassMatrix.mapRect(m_renderer->boundsOnElement("linkrate")).y(); + qreal linkRateHeight = compassMatrix.mapRect(m_renderer->boundsOnElement("linkrate")).height(); + gcsTelemetryStats = new QGraphicsTextItem(); + gcsTelemetryStats->setDefaultTextColor(QColor("White")); + gcsTelemetryStats->setFont(QFont("Arial",(int) linkRateHeight)); + l_scene->addItem(gcsTelemetryStats); + matrix.reset(); + matrix.translate(startX,startY-linkRateHeight/2); + gcsTelemetryStats->setTransform(matrix,false); + l_scene->setSceneRect(m_background->boundingRect()); ///////////////// diff --git a/ground/src/plugins/pfd/pfdgadgetwidget.h b/ground/src/plugins/pfd/pfdgadgetwidget.h index 5eca8d6f6..6592286fe 100644 --- a/ground/src/plugins/pfd/pfdgadgetwidget.h +++ b/ground/src/plugins/pfd/pfdgadgetwidget.h @@ -105,6 +105,7 @@ private: QGraphicsTextItem *m_altitudetext; // GCS link status Arrow QGraphicsSvgItem *gcsTelemetryArrow; + QGraphicsTextItem *gcsTelemetryStats; double n1MinValue; double n1MaxValue;