1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-82: Added Tx/Rx data rate to PFD.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1052 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2010-07-09 23:04:35 +00:00 committed by edouard
parent 26f46b614d
commit e367d341a9
3 changed files with 50 additions and 22 deletions

View File

@ -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</tspan></text>
<path
style="fill:#1d8300;fill-opacity:1;stroke:#113b05;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 564.46481,544.73839 0,9.28125 -31.40625,0 0,4.90625 0,0.0937 0,4.90625 31.40625,0 0,9.28125 14.25,-14.25 -14.25,-14.21875 z"
id="path7543"
sodipodi:nodetypes="cccccccccc" />
<path
sodipodi:nodetypes="cccccccccc"
id="gcstelemetry-Connected"
d="m 559.1615,602.3171 0,9.28125 -31.40625,0 0,4.90625 0,0.0937 0,4.90625 31.40625,0 0,9.28125 14.25,-14.25 -14.25,-14.21875 z"
d="m -109.55949,412.40842 0,9.28125 -31.40625,0 0,4.90625 0,0.0937 0,4.90625 31.40625,0 0,9.28125 14.250003,-14.25 -14.250003,-14.21875 z"
style="fill:#1c870b;fill-opacity:1;stroke:#113b05;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
inkscape:label="#path7548" />
<path
inkscape:label="#path7548"
style="fill:#ff251b;fill-opacity:1;stroke:#6f100c;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 510.42164,607.11532 0,9.28125 -10.62948,0 6.29058,7.3236 -15.93279,-7.3236 -11.13456,0 0,4.90625 0,0.0937 0,4.90625 10.88202,0 -4.27027,-6.81853 13.4074,6.81853 11.3871,0 0,9.28125 14.25,-14.25 -14.25,-14.21875 0,5e-5 z"
d="m -109.81202,372.75993 0,9.28125 -10.62948,0 6.29058,7.3236 -15.93279,-7.3236 -11.13456,0 0,4.90625 0,0.0937 0,4.90625 10.88202,0 -4.27027,-6.81853 13.4074,6.81853 11.3871,0 0,9.28125 14.249996,-14.25 -14.249996,-14.21875 0,5e-5 z"
id="gcstelemetry-HandshakeReq"
sodipodi:nodetypes="ccccccccccccccccc" />
<path
@ -3671,18 +3666,34 @@
d="m 530.35185,628.93513 0,9.28125 -31.40625,0 0,4.90625 0,0.0937 0,4.90625 31.40625,0 0,9.28125 14.25,-14.25 -14.25,-14.21875 z"
id="gcstelemetry-Disconnected"
sodipodi:nodetypes="cccccccccc" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
x="490.42905"
y="675.74341"
id="linkrate"
inkscape:label="#text13820"><tspan
sodipodi:role="line"
id="tspan13822"
x="490.42905"
y="675.74341"
style="-inkscape-font-specification:Arial;font-family:Arial;fill:#ffffff;fill-opacity:1;font-size:20">100/10</tspan></text>
<g
style="font-size:40px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:#ffffff;font-family:Bitstream Vera Sans;stroke-opacity:1"
id="linkrate">
<path
d="m 491.95248,675.74341 0,-1.49414 3.50586,0 0,-10.58594 -3.10547,2.2168 0,-1.66016 3.25196,-2.23633 1.62109,0 0,12.26563 3.34961,0 0,1.49414 -8.62305,0"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13825" />
<path
d="m 511.90366,668.85864 c -10e-6,1.32162 -0.12697,2.4349 -0.38086,3.33985 -0.24741,0.89844 -0.58921,1.6276 -1.02539,2.1875 -0.4297,0.55338 -0.93751,0.95052 -1.52344,1.1914 -0.58595,0.24089 -1.21095,0.36133 -1.875,0.36133 -0.67058,0 -1.29558,-0.12044 -1.875,-0.36133 -0.57943,-0.24088 -1.08399,-0.63802 -1.51367,-1.1914 -0.42318,-0.55339 -0.75847,-1.2793 -1.00586,-2.17774 -0.24089,-0.90494 -0.36133,-2.02148 -0.36133,-3.34961 0,-1.38671 0.12044,-2.53254 0.36133,-3.4375 0.24739,-0.91144 0.58593,-1.63736 1.01562,-2.17773 0.42969,-0.54035 0.9375,-0.91796 1.52344,-1.13281 0.58593,-0.22134 1.22395,-0.33202 1.91406,-0.33204 0.65755,2e-5 1.27278,0.1107 1.84571,0.33204 0.57941,0.21485 1.08397,0.59246 1.51367,1.13281 0.42968,0.54037 0.76822,1.26629 1.01562,2.17773 0.24739,0.90496 0.37109,2.05079 0.3711,3.4375 m -1.78711,0 c -1e-5,-1.09374 -0.0651,-2.00194 -0.19532,-2.72461 -0.13021,-0.72915 -0.32227,-1.30858 -0.57617,-1.73828 -0.25391,-0.43618 -0.56641,-0.74217 -0.9375,-0.91797 -0.36459,-0.18228 -0.78125,-0.27342 -1.25,-0.27343 -0.49479,10e-6 -0.93099,0.0911 -1.30859,0.27343 -0.37761,0.18231 -0.69662,0.49155 -0.95703,0.92774 -0.25391,0.4297 -0.44597,1.00912 -0.57617,1.73828 -0.13022,0.72266 -0.19532,1.62761 -0.19532,2.71484 0,1.0547 0.0651,1.94337 0.19532,2.66602 0.13671,0.72266 0.33202,1.30534 0.58593,1.74805 0.26042,0.4362 0.57617,0.75195 0.94727,0.94726 0.37109,0.1888 0.79426,0.28321 1.26953,0.2832 0.46223,1e-5 0.8789,-0.0944 1.25,-0.2832 0.37109,-0.19531 0.68359,-0.51106 0.9375,-0.94726 0.26041,-0.44271 0.45898,-1.02539 0.5957,-1.74805 0.14322,-0.72265 0.21484,-1.61132 0.21485,-2.66602"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13827" />
<path
d="m 523.03647,668.85864 c -10e-6,1.32162 -0.12696,2.4349 -0.38086,3.33985 -0.24741,0.89844 -0.5892,1.6276 -1.02539,2.1875 -0.4297,0.55338 -0.93751,0.95052 -1.52344,1.1914 -0.58594,0.24089 -1.21094,0.36133 -1.875,0.36133 -0.67058,0 -1.29558,-0.12044 -1.875,-0.36133 -0.57943,-0.24088 -1.08399,-0.63802 -1.51367,-1.1914 -0.42318,-0.55339 -0.75847,-1.2793 -1.00586,-2.17774 -0.24089,-0.90494 -0.36133,-2.02148 -0.36133,-3.34961 0,-1.38671 0.12044,-2.53254 0.36133,-3.4375 0.24739,-0.91144 0.58594,-1.63736 1.01562,-2.17773 0.42969,-0.54035 0.9375,-0.91796 1.52344,-1.13281 0.58594,-0.22134 1.22396,-0.33202 1.91406,-0.33204 0.65755,2e-5 1.27278,0.1107 1.84571,0.33204 0.57942,0.21485 1.08397,0.59246 1.51367,1.13281 0.42968,0.54037 0.76822,1.26629 1.01562,2.17773 0.24739,0.90496 0.37109,2.05079 0.3711,3.4375 m -1.78711,0 c -10e-6,-1.09374 -0.0651,-2.00194 -0.19531,-2.72461 -0.13022,-0.72915 -0.32228,-1.30858 -0.57618,-1.73828 -0.25391,-0.43618 -0.56641,-0.74217 -0.9375,-0.91797 -0.36459,-0.18228 -0.78125,-0.27342 -1.25,-0.27343 -0.49479,10e-6 -0.93099,0.0911 -1.30859,0.27343 -0.37761,0.18231 -0.69662,0.49155 -0.95703,0.92774 -0.25391,0.4297 -0.44597,1.00912 -0.57617,1.73828 -0.13021,0.72266 -0.19532,1.62761 -0.19531,2.71484 -1e-5,1.0547 0.0651,1.94337 0.19531,2.66602 0.13671,0.72266 0.33203,1.30534 0.58594,1.74805 0.26041,0.4362 0.57616,0.75195 0.94726,0.94726 0.37109,0.1888 0.79427,0.28321 1.26953,0.2832 0.46224,1e-5 0.8789,-0.0944 1.25,-0.2832 0.37109,-0.19531 0.68359,-0.51106 0.9375,-0.94726 0.26041,-0.44271 0.45898,-1.02539 0.59571,-1.74805 0.14322,-0.72265 0.21483,-1.61132 0.21484,-2.66602"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13829" />
<path
d="m 523.82748,675.93872 4.01368,-14.6875 1.54296,0 -3.9746,14.6875 -1.58204,0"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13831" />
<path
d="m 530.8978,675.74341 0,-1.49414 3.50586,0 0,-10.58594 -3.10547,2.2168 0,-1.66016 3.25195,-2.23633 1.62109,0 0,12.26563 3.34961,0 0,1.49414 -8.62304,0"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13833" />
<path
d="m 550.84897,668.85864 c -10e-6,1.32162 -0.12696,2.4349 -0.38086,3.33985 -0.24741,0.89844 -0.5892,1.6276 -1.02539,2.1875 -0.4297,0.55338 -0.93751,0.95052 -1.52344,1.1914 -0.58594,0.24089 -1.21094,0.36133 -1.875,0.36133 -0.67058,0 -1.29558,-0.12044 -1.875,-0.36133 -0.57943,-0.24088 -1.08399,-0.63802 -1.51367,-1.1914 -0.42318,-0.55339 -0.75847,-1.2793 -1.00586,-2.17774 -0.24089,-0.90494 -0.36133,-2.02148 -0.36133,-3.34961 0,-1.38671 0.12044,-2.53254 0.36133,-3.4375 0.24739,-0.91144 0.58594,-1.63736 1.01562,-2.17773 0.42969,-0.54035 0.9375,-0.91796 1.52344,-1.13281 0.58594,-0.22134 1.22396,-0.33202 1.91406,-0.33204 0.65755,2e-5 1.27278,0.1107 1.84571,0.33204 0.57942,0.21485 1.08397,0.59246 1.51367,1.13281 0.42968,0.54037 0.76822,1.26629 1.01562,2.17773 0.24739,0.90496 0.37109,2.05079 0.3711,3.4375 m -1.78711,0 c -10e-6,-1.09374 -0.0651,-2.00194 -0.19531,-2.72461 -0.13022,-0.72915 -0.32228,-1.30858 -0.57618,-1.73828 -0.25391,-0.43618 -0.56641,-0.74217 -0.9375,-0.91797 -0.36459,-0.18228 -0.78125,-0.27342 -1.25,-0.27343 -0.49479,10e-6 -0.93099,0.0911 -1.30859,0.27343 -0.37761,0.18231 -0.69662,0.49155 -0.95703,0.92774 -0.25391,0.4297 -0.44597,1.00912 -0.57617,1.73828 -0.13021,0.72266 -0.19532,1.62761 -0.19531,2.71484 -1e-5,1.0547 0.0651,1.94337 0.19531,2.66602 0.13671,0.72266 0.33203,1.30534 0.58594,1.74805 0.26041,0.4362 0.57616,0.75195 0.94726,0.94726 0.37109,0.1888 0.79427,0.28321 1.26953,0.2832 0.46224,1e-5 0.8789,-0.0944 1.25,-0.2832 0.37109,-0.19531 0.68359,-0.51106 0.9375,-0.94726 0.26041,-0.44271 0.45898,-1.02539 0.59571,-1.74805 0.14322,-0.72265 0.21483,-1.61132 0.21484,-2.66602"
style="font-size:20px;font-family:Arial;-inkscape-font-specification:Arial;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1"
id="path13835" />
</g>
</g>
<g
inkscape:groupmode="layer"

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 307 KiB

View File

@ -115,12 +115,16 @@ void PFDGadgetWidget::updateLinkStatus(UAVObject *object1) {
UAVObjectField* field2 = object1->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());
/////////////////

View File

@ -105,6 +105,7 @@ private:
QGraphicsTextItem *m_altitudetext;
// GCS link status Arrow
QGraphicsSvgItem *gcsTelemetryArrow;
QGraphicsTextItem *gcsTelemetryStats;
double n1MinValue;
double n1MaxValue;