Commit c3251189 authored by Don Gagne's avatar Don Gagne

Merge pull request #1485 from dogmaphobic/rssiIndicator

Added RSSI Indicator to ToolBar.
parents bd4a6595 48a3ea0d
......@@ -156,6 +156,8 @@
<file alias="Kill">resources/Kill.svg</file>
<file alias="Shutdown">resources/Shutdown.svg</file>
<file alias="AntennaT">resources/Antenna_T.svg</file>
<file alias="AntennaRC">resources/Antenna_RC.svg</file>
<file alias="Gps">resources/Gps.svg</file>
<file alias="Megaphone">resources/Megaphone.png</file>
<file alias="Yield">resources/Yield.png</file>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 288" enable-background="new 0 0 288 288" xml:space="preserve">
<g id="Layer_1">
<g>
<path fill="#FFFFFF" d="M130.837,125.576l0.249,38.177h26.325l-0.249-38.16c7.832-4.559,13.162-12.957,13.162-22.692
c0-14.534-11.774-26.325-26.325-26.325c-14.534,0-26.325,11.791-26.325,26.325C117.675,112.637,123.005,121.035,130.837,125.576z"
/>
<path fill="#FFFFFF" d="M184.344,143.246l18.613,18.613c15.734-15.734,24.405-36.677,24.405-58.957s-8.672-43.19-24.439-58.957
L184.31,62.557c10.78,10.798,16.727,25.125,16.727,40.345C201.037,118.155,195.107,132.483,184.344,143.246z"/>
<path fill="#FFFFFF" d="M240.551,163.753h30.055c9.024-18.75,13.794-39.435,13.794-60.851
c-0.001-37.534-14.62-72.805-41.167-99.302L224.62,22.213c21.578,21.561,33.455,50.216,33.455,80.689
C258.075,124.772,251.965,145.706,240.551,163.753z"/>
<path fill="#FFFFFF" d="M85.077,161.858l18.613-18.613c-10.798-10.763-16.727-25.091-16.727-40.345
c-0.001-15.218,5.93-29.546,16.693-40.344L85.043,43.944c-15.734,15.768-24.405,36.711-24.405,58.957
C60.637,125.181,69.31,146.125,85.077,161.858z"/>
<path fill="#FFFFFF" d="M47.475,163.753c-11.431-18.047-17.55-38.981-17.55-60.851c0-30.473,11.86-59.129,33.421-80.655
L44.733,3.635C18.202,30.131,3.6,65.402,3.6,102.902c0,21.416,4.776,42.102,13.811,60.851H47.475z"/>
</g>
</g>
<g id="Layer_2">
<g>
<path fill="#FFFFFF" d="M46.824,279.138v-97.475h50.201c9.309,0,16.423,0.798,21.344,2.394c4.92,1.596,8.887,4.555,11.902,8.876
c3.014,4.323,4.521,9.586,4.521,15.792c0,5.409-1.153,10.074-3.459,13.996c-2.307,3.924-5.479,7.105-9.513,9.542
c-2.573,1.552-6.099,2.837-10.578,3.856c3.587,1.199,6.201,2.397,7.841,3.594c1.107,0.799,2.713,2.506,4.817,5.124
c2.104,2.618,3.511,4.637,4.219,6.056l14.586,28.245H108.67L92.569,249.35c-2.039-3.856-3.856-6.36-5.452-7.513
c-2.172-1.506-4.632-2.261-7.38-2.261h-2.66v39.562H46.824z M77.077,221.158h12.7c1.373,0,4.033-0.442,7.979-1.33
c1.995-0.399,3.624-1.418,4.887-3.059c1.264-1.639,1.895-3.524,1.895-5.652c0-3.147-0.997-5.562-2.992-7.247
c-1.995-1.684-5.741-2.527-11.237-2.527H77.077V221.158z"/>
<path fill="#FFFFFF" d="M214.779,239.243l26.398,7.979c-1.773,7.404-4.566,13.587-8.378,18.551
c-3.814,4.965-8.545,8.71-14.197,11.237c-5.651,2.527-12.842,3.79-21.575,3.79c-10.596,0-19.25-1.54-25.965-4.618
c-6.716-3.078-12.511-8.493-17.387-16.246c-4.878-7.752-7.314-17.675-7.314-29.769c0-16.124,4.287-28.516,12.866-37.176
c8.576-8.66,20.711-12.991,36.403-12.991c12.279,0,21.931,2.483,28.956,7.447c7.027,4.966,12.245,12.59,15.66,22.873
l-26.596,5.918c-0.931-2.969-1.906-5.142-2.926-6.516c-1.686-2.304-3.747-4.078-6.185-5.319c-2.438-1.24-5.163-1.862-8.177-1.862
c-6.826,0-12.059,2.746-15.692,8.235c-2.75,4.074-4.122,10.472-4.122,19.193c0,10.803,1.638,18.209,4.92,22.215
c3.28,4.007,7.888,6.01,13.83,6.01c5.761,0,10.117-1.618,13.064-4.854C211.311,250.104,213.449,245.405,214.779,239.243z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 288" enable-background="new 0 0 288 288" xml:space="preserve">
<g id="Layer_1">
<path fill="#FFFFFF" d="M29.925,102.902c0,30.473,11.877,59.129,33.455,80.689l-18.613,18.613
C18.219,175.672,3.6,140.401,3.6,102.902S18.202,30.131,44.733,3.635l18.613,18.612C41.785,43.773,29.925,72.429,29.925,102.902z
M103.656,62.557L85.043,43.944c-15.734,15.768-24.405,36.711-24.405,58.957c0,22.28,8.672,43.224,24.44,58.957l18.613-18.613
c-10.798-10.763-16.727-25.091-16.727-40.345C86.962,87.683,92.893,73.355,103.656,62.557z M243.233,3.6L224.62,22.213
c21.578,21.561,33.455,50.216,33.455,80.689s-11.86,59.129-33.403,80.689l18.613,18.613c26.514-26.531,41.116-61.802,41.116-99.302
C284.399,65.368,269.78,30.097,243.233,3.6z M144,76.577c-14.534,0-26.325,11.791-26.325,26.325c0,9.735,5.33,18.133,13.162,22.675
l0,33.674h26.325l0-33.657c7.832-4.559,13.162-12.957,13.162-22.692C170.325,88.368,158.55,76.577,144,76.577z M202.923,43.945
L184.31,62.557c10.78,10.798,16.727,25.126,16.727,40.345c0,15.254-5.93,29.582-16.693,40.345l18.613,18.613
c15.734-15.734,24.405-36.677,24.405-58.957S218.69,59.712,202.923,43.945z"/>
</g>
<g id="Layer_2">
<g>
<path fill="#FFFFFF" d="M96.66,180h94.681v24.891h-31.766V280.8h-31.148v-75.909H96.66V180z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_0.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.3 620"
enable-background="new -142 87 326.3 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="387.50002" inkscape:zoom="1.4103225" inkscape:cx="115.31779" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.7,667.9v-502
c0-14.8,13.1-26.8,29.3-26.8h239.2c16.2,0,29.3,12,29.3,26.8v502c0,14.8-13.1,26.8-29.3,26.8H-98.4
C-114.6,694.7-127.7,682.7-127.7,667.9z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.6,677.6V156.1c0-15.4,14.2-27.9,31.8-27.9h259.9
c17.6,0,31.8,12.6,31.8,27.9v521.5c0,15.4-14.2,27.9-31.8,27.9h-259.8C-126.3,705.5-140.6,693-140.6,677.6z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M231.3-81.3c0,2.2-1.7,3.9-3.9,3.9h-155c-2.2,0-3.9-1.7-3.9-3.9v-40.2c0-2.2,1.7-3.9,3.9-3.9h155c2.2,0,3.9,1.7,3.9,3.9L231.3-81.3
L231.3-81.3L231.3-81.3z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
<text transform="matrix(0.757 0 0 1 -80.0776 552.9648)" font-family="'Helvetica'" font-size="406.7761">X</text>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_100.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.3 620"
enable-background="new -142 87 326.3 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="393.84035" inkscape:zoom="1.2144444" inkscape:cx="202.22082" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.7,667.9v-502
c0-14.8,13.1-26.8,29.3-26.8h239.2c16.2,0,29.3,12,29.3,26.8v502c0,14.8-13.1,26.8-29.3,26.8H-98.4
C-114.6,694.7-127.7,682.7-127.7,667.9z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.6,677.6V156.1c0-15.4,14.2-27.9,31.8-27.9h259.9
c17.6,0,31.8,12.6,31.8,27.9v521.5c0,15.4-14.2,27.9-31.8,27.9h-259.8C-126.3,705.5-140.6,693-140.6,677.6z"/>
<path id="path4669" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.4,260.4v-90.1h225.1v90.1
H-91.4L-91.4,260.4z"/>
<path id="path4671" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.4,363.3v-90.1h225.1v90.1
H-91.4z"/>
<path id="path4673" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.4,466.3v-90.1h225.1v90.1
H-91.4z"/>
<path id="path4675" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.4,569.2v-90.1h225.1v90.1
H-91.4z"/>
<path id="path4679" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.4,672V582h225.1V672H-91.4
z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<path id="path4679" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" fill="#0F763C" d="M30.9,265.899V42.117H131.1
v223.782H30.9z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M229.9-81.3c0,2.2-1.7,3.9-3.9,3.9h-155c-2.2,0-3.9-1.7-3.9-3.9v-40.2c0-2.2,1.7-3.9,3.9-3.9h155c2.2,0,3.9,1.7,3.9,3.9L229.9-81.3
L229.9-81.3L229.9-81.3z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_100.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.32 620"
enable-background="new -142 87 326.32 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="393.84035" inkscape:zoom="1.2144444" inkscape:cx="202.22082" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.68,667.88v-502
c0-14.8,13.12-26.8,29.28-26.8h239.2c16.16,0,29.28,12,29.28,26.8v502c0,14.8-13.12,26.8-29.28,26.8H-98.4
C-114.64,694.68-127.68,682.68-127.68,667.88z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.56,677.64V156.12c0-15.36,14.24-27.92,31.76-27.92
h259.92c17.6,0,31.76,12.56,31.76,27.92v521.52c0,15.36-14.24,27.92-31.76,27.92h-259.84C-126.32,705.48-140.56,693-140.56,677.64z"
/>
<path id="path4679" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#471F0D" d="M-91.36,672.04v-90.08h225.12
v90.08H-91.36z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<path id="path4679" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" fill="#5B140E" d="M30.9,265.899v-39.866H131.1
v39.866H30.9z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M229.861-81.283c0,2.24-1.68,3.92-3.92,3.92H70.901c-2.24,0-3.92-1.68-3.92-3.92v-40.16c0-2.24,1.68-3.92,3.92-3.92h155.04
c2.24,0,3.92,1.68,3.92,3.92L229.861-81.283L229.861-81.283L229.861-81.283z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_100.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.32 620"
enable-background="new -142 87 326.32 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="393.84035" inkscape:zoom="1.2144444" inkscape:cx="202.22082" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.68,667.88v-502
c0-14.8,13.12-26.8,29.28-26.8h239.2c16.16,0,29.28,12,29.28,26.8v502c0,14.8-13.12,26.8-29.28,26.8H-98.4
C-114.64,694.68-127.68,682.68-127.68,667.88z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.56,677.64V156.12c0-15.36,14.24-27.92,31.76-27.92
h259.92c17.6,0,31.76,12.56,31.76,27.92v521.52c0,15.36-14.24,27.92-31.76,27.92h-259.84C-126.32,705.48-140.56,693-140.56,677.64z"
/>
<path id="path4675" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#9F4B23" d="M-91.36,569.16v-90.08h225.12
v90.08H-91.36z"/>
<path id="path4679" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#9F4B23" d="M-91.36,672.04v-90.08h225.12
v90.08H-91.36z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<path id="path4679" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" fill="#5B4219" d="M30.9,265.899v-86.02H131.1
v86.02H30.9z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M229.861-81.283c0,2.24-1.68,3.92-3.92,3.92H70.901c-2.24,0-3.92-1.68-3.92-3.92v-40.16c0-2.24,1.68-3.92,3.92-3.92h155.04
c2.24,0,3.92,1.68,3.92,3.92L229.861-81.283L229.861-81.283L229.861-81.283z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_100.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.32 620"
enable-background="new -142 87 326.32 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="393.84035" inkscape:zoom="1.2144444" inkscape:cx="202.22082" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.68,667.88v-502
c0-14.8,13.12-26.8,29.28-26.8h239.2c16.16,0,29.28,12,29.28,26.8v502c0,14.8-13.12,26.8-29.28,26.8H-98.4
C-114.64,694.68-127.68,682.68-127.68,667.88z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.56,677.64V156.12c0-15.36,14.24-27.92,31.76-27.92
h259.92c17.6,0,31.76,12.56,31.76,27.92v521.52c0,15.36-14.24,27.92-31.76,27.92h-259.84C-126.32,705.48-140.56,693-140.56,677.64z"
/>
<path id="path4673" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,466.28V376.2h225.12
v90.08H-91.36z"/>
<path id="path4675" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,569.16v-90.08h225.12
v90.08H-91.36z"/>
<path id="path4679" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,672.04v-90.08h225.12
v90.08H-91.36z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<path id="path4679" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" fill="#5C5B27" d="M30.9,265.899V133.958H131.1
v131.941H30.9z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M229.861-81.283c0,2.24-1.68,3.92-3.92,3.92H70.901c-2.24,0-3.92-1.68-3.92-3.92v-40.16c0-2.24,1.68-3.92,3.92-3.92h155.04
c2.24,0,3.92,1.68,3.92,3.92L229.861-81.283L229.861-81.283L229.861-81.283z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg4264" sodipodi:docname="battery_100.svg" inkscape:version="0.91 r13725" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-142 87 326.32 620"
enable-background="new -142 87 326.32 620" xml:space="preserve">
<title id="title4294">Battery</title>
<sodipodi:namedview inkscape:window-maximized="0" inkscape:window-y="65" inkscape:window-x="2776" inkscape:window-height="1259" inkscape:window-width="2003" fit-margin-bottom="0.02" fit-margin-right="0.02" inkscape:current-layer="layer1" inkscape:pageshadow="2" inkscape:document-units="in" inkscape:pageopacity="0.0" units="in" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" showgrid="false" inkscape:cy="393.84035" inkscape:zoom="1.2144444" inkscape:cx="202.22082" id="base" fit-margin-top="0.02" fit-margin-left="0.02" showborder="true">
</sodipodi:namedview>
<path id="rect4970" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" d="M-127.68,667.88v-502
c0-14.8,13.12-26.8,29.28-26.8h239.2c16.16,0,29.28,12,29.28,26.8v502c0,14.8-13.12,26.8-29.28,26.8H-98.4
C-114.64,694.68-127.68,682.68-127.68,667.88z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M-140.56,677.64V156.12c0-15.36,14.24-27.92,31.76-27.92
h259.92c17.6,0,31.76,12.56,31.76,27.92v521.52c0,15.36-14.24,27.92-31.76,27.92h-259.84C-126.32,705.48-140.56,693-140.56,677.64z"
/>
<path id="path4671" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,363.32v-90.08h225.12
v90.08H-91.36z"/>
<path id="path4673" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,466.28V376.2h225.12
v90.08H-91.36z"/>
<path id="path4675" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,569.16v-90.08h225.12
v90.08H-91.36z"/>
<path id="path4679" sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" fill="#09753B" d="M-91.36,672.04v-90.08h225.12
v90.08H-91.36z"/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 162 288" enable-background="new 0 0 162 288" xml:space="preserve">
<path id="rect4970" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" d="M14.742,264.074V40.618
c0-6.588,5.831-11.93,13.042-11.93H134.26c7.211,0,13.042,5.342,13.042,11.93v223.456c0,6.588-5.831,11.93-13.042,11.93H27.785
C20.573,276.003,14.742,270.662,14.742,264.074z"/>
<path id="rect4360" inkscape:connector-curvature="0" fill="none" d="M9,268.391V36.255c0-6.855,6.321-12.419,14.155-12.419h115.69
c7.834,0,14.155,5.609,14.155,12.419v232.136c0,6.855-6.321,12.419-14.155,12.419H23.2C15.365,280.811,9,275.246,9,268.391z"/>
<path id="path4679" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccc" fill="#0F763C" d="M30.9,265.899V88.27H131.1
v177.628H30.9z"/>
<g id="g4222" transform="translate(-127.22081,216.20249)">
<path id="path4224" inkscape:connector-curvature="0" fill="#E6E7E8" stroke="#E6E7E8" stroke-width="6" stroke-miterlimit="10" d="
M229.861-81.283c0,2.24-1.68,3.92-3.92,3.92H70.901c-2.24,0-3.92-1.68-3.92-3.92v-40.16c0-2.24,1.68-3.92,3.92-3.92h155.04
c2.24,0,3.92,1.68,3.92,3.92L229.861-81.283L229.861-81.283L229.861-81.283z"/>
<path id="path4224" inkscape:connector-curvature="0" fill="#E7E7E7" stroke="#E7E7E7" stroke-width="6" stroke-miterlimit="10" d="
M244.512-189.383c0,0.979-0.757,1.736-1.736,1.736h-68.995c-0.979,0-1.736-0.757-1.736-1.736v-17.894
c0-0.979,0.757-1.736,1.736-1.736h68.995c0.979,0,1.736,0.757,1.736,1.736V-189.383L244.512-189.383L244.512-189.383z"/>
</g>
</svg>
......@@ -100,7 +100,7 @@ void QGCAudioWorker::say(QString inText, int severity)
if (!muted)
{
QString text = _fixMillisecondString(inText);
QString text = _fixTextMessageForAudio(inText);
// Prepend high priority text with alert beep
if (severity < GAudioOutput::AUDIO_SEVERITY_CRITICAL) {
beep();
......@@ -187,10 +187,18 @@ bool QGCAudioWorker::_getMillisecondString(const QString& string, QString& match
return false;
}
QString QGCAudioWorker::_fixMillisecondString(const QString& string) {
QString QGCAudioWorker::_fixTextMessageForAudio(const QString& string) {
QString match;
QString newNumber;
QString result = string;
//-- Look for modes
if(result.contains("POSCTL", Qt::CaseInsensitive)) {
result.replace("POSCTL", "Position Control", Qt::CaseInsensitive);
} else if(result.contains("ALTCTL", Qt::CaseInsensitive)) {
result.replace("ALTCTL", "Altitude Control", Qt::CaseInsensitive);
} else if(result.contains("RTL", Qt::CaseInsensitive)) {
result.replace("RTL", "Return To Land", Qt::CaseInsensitive);
}
int number;
if(_getMillisecondString(string, match, number) && number > 1000) {
if(number < 60000) {
......
......@@ -51,7 +51,7 @@ protected:
QTimer *emergencyTimer;
bool muted;
private:
QString _fixMillisecondString(const QString& string);
QString _fixTextMessageForAudio(const QString& string);
bool _getMillisecondString(const QString& string, QString& match, int& number);
};
......
......@@ -254,7 +254,7 @@ signals:
void paramRewriteTimeoutChanged(int ms);
/** @brief Emitted if action guard status changed */
void actionGuardChanged(bool enabled);
/** @brief Emitted if actiion request timeout changed */
/** @brief Emitted if action request timeout changed */
void actionRetransmissionTimeoutChanged(int ms);
/** @brief Update the packet loss from one system */
void receiveLossChanged(int uasId, float loss);
......
......@@ -923,10 +923,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_rc_channels_t channels;
mavlink_msg_rc_channels_decode(&message, &channels);
// UINT8_MAX indicates this value is unknown
if (channels.rssi != UINT8_MAX) {
emit remoteControlRSSIChanged(channels.rssi/100.0f);
}
emit remoteControlRSSIChanged(channels.rssi);
if (channels.chan1_raw != UINT16_MAX && channels.chancount > 0)
emit remoteControlChannelRawChanged(0, channels.chan1_raw);
......@@ -967,6 +964,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
}
break;
// TODO: (gg 20150420) PX4 Firmware does not seem to send this message. Don't know what to do about it.
case MAVLINK_MSG_ID_RC_CHANNELS_SCALED:
{
mavlink_rc_channels_scaled_t channels;
......@@ -974,7 +973,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
const unsigned int portWidth = 8; // XXX magic number
emit remoteControlRSSIChanged(channels.rssi/255.0f);
emit remoteControlRSSIChanged(channels.rssi);
if (static_cast<uint16_t>(channels.chan1_scaled) != UINT16_MAX)
emit remoteControlChannelScaledChanged(channels.port * portWidth + 0, channels.chan1_scaled/10000.0f);
if (static_cast<uint16_t>(channels.chan2_scaled) != UINT16_MAX)
......
......@@ -570,8 +570,8 @@ signals:
void remoteControlChannelRawChanged(int channelId, float raw);
/** @brief Value of a remote control channel (scaled)*/
void remoteControlChannelScaledChanged(int channelId, float normalized);
/** @brief Remote control RSSI changed */
void remoteControlRSSIChanged(float rssi);
/** @brief Remote control RSSI changed (0% - 100%)*/
void remoteControlRSSIChanged(uint8_t rssi);
/**
* @brief Localization quality changed
......
......@@ -148,7 +148,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
emit initStatusChanged(tr("Setting up user interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
_ui.setupUi(this);
// Make sure tool bar elements all fit before changing minimum width
setMinimumWidth(926);
setMinimumWidth(1008);
configureWindowName();
// Setup central widget with a layout to hold the views
......
......@@ -81,6 +81,7 @@ _ui(new Ui::SettingsDialog)
_ui->showGPS->setChecked(settings.value( TOOL_BAR_SHOW_GPS, true).toBool());
_ui->showMav->setChecked(settings.value( TOOL_BAR_SHOW_MAV, true).toBool());
_ui->showMessages->setChecked(settings.value(TOOL_BAR_SHOW_MESSAGES, true).toBool());
_ui->showRSSI->setChecked(settings.value( TOOL_BAR_SHOW_RSSI, true).toBool());
settings.endGroup();
// Audio preferences
_ui->audioMuteCheckBox->setChecked(GAudioOutput::instance()->isMuted());
......@@ -206,3 +207,8 @@ void SettingsDialog::on_showMav_clicked(bool checked)
{
_mainWindow->getMainToolBar()->viewStateChanged(TOOL_BAR_SHOW_MAV, checked);
}
void SettingsDialog::on_showRSSI_clicked(bool checked)
{
_mainWindow->getMainToolBar()->viewStateChanged(TOOL_BAR_SHOW_RSSI, checked);
}
......@@ -65,6 +65,8 @@ private slots:
void on_showMessages_clicked(bool checked);
void on_showMav_clicked(bool checked);
void on_showRSSI_clicked(bool checked);
private:
MainWindow* _mainWindow;
Ui::SettingsDialog* _ui;
......
This diff is collapsed.
......@@ -303,10 +303,14 @@ void QGCFlightDisplay::_checkUpdate()
emit longitudeChanged();
}
if(_mav) {
_latitude = _mav->getLatitude();
_longitude = _mav->getLongitude();
if(_latitude) emit latitudeChanged();
if(_longitude) emit longitudeChanged();
if(_latitude != _mav->getLatitude()) {
_latitude = _mav->getLatitude();
emit latitudeChanged();
}
if(_longitude != _mav->getLongitude()) {
_longitude = _mav->getLongitude();
emit longitudeChanged();
}
}
}
......@@ -58,8 +58,12 @@ MainToolBar::MainToolBar(QWidget* parent)
, _showGPS(true)
, _showMav(true)
, _showMessages(true)
, _showRSSI(true)
, _showBattery(true)
, _progressBarValue(0.0f)
, _remoteRSSI(0)
, _telemetryRRSSI(0)
, _telemetryLRSSI(0)
, _rollDownMessages(0)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
......@@ -95,10 +99,14 @@ MainToolBar::MainToolBar(QWidget* parent)
emit heartbeatTimeoutChanged(_currentHeartbeatTimeout);
emit connectionCountChanged(_connectionCount);
// Link signals
connect(UASManager::instance(), &UASManager::activeUASSet, this, &MainToolBar::_setActiveUAS);
connect(LinkManager::instance(), &LinkManager::linkConfigurationChanged, this, &MainToolBar::_updateConfigurations);
connect(LinkManager::instance(), &LinkManager::linkConnected, this, &MainToolBar::_linkConnected);
connect(LinkManager::instance(), &LinkManager::linkDisconnected, this, &MainToolBar::_linkDisconnected);
connect(UASManager::instance(), &UASManager::activeUASSet, this, &MainToolBar::_setActiveUAS);
connect(LinkManager::instance(), &LinkManager::linkConfigurationChanged, this, &MainToolBar::_updateConfigurations);
connect(LinkManager::instance(), &LinkManager::linkConnected, this, &MainToolBar::_linkConnected);
connect(LinkManager::instance(), &LinkManager::linkDisconnected, this, &MainToolBar::_linkDisconnected);
// RSSI (didn't like standard connection)
connect(MAVLinkProtocol::instance(),
SIGNAL(radioStatusChanged(LinkInterface*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned)), this,
SLOT(_telemetryChanged(LinkInterface*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned)));
}
MainToolBar::~MainToolBar()
......@@ -124,6 +132,9 @@ void MainToolBar::_setToolBarState(const QString& key, bool value)
} else if(key == TOOL_BAR_SHOW_MESSAGES) {
_showMessages = value;
emit showMessagesChanged(value);
} else if(key == TOOL_BAR_SHOW_RSSI) {
_showRSSI = value;
emit showRSSIChanged(value);
}
}
......@@ -296,6 +307,7 @@ void MainToolBar::_setActiveUAS(UASInterface* active)
disconnect(_mav, &UASInterface::nameChanged, this, &MainToolBar::_updateName);
disconnect(_mav, &UASInterface::systemTypeSet, this, &MainToolBar::_setSystemType);
disconnect(_mav, &UASInterface::localizationChanged, this, &MainToolBar::_setSatLoc);
disconnect(_mav, &UASInterface::remoteControlRSSIChanged, this, &MainToolBar::_remoteControlRSSIChanged);
disconnect(_mav, SIGNAL(statusChanged(UASInterface*,QString,QString)), this, SLOT(_updateState(UASInterface*,QString,QString)));
disconnect(_mav, SIGNAL(armingChanged(bool)), this, SLOT(_updateArmingState(bool)));
if (_mav->getWaypointManager())
......@@ -324,6 +336,7 @@ void MainToolBar::_setActiveUAS(UASInterface* active)
connect(_mav, &UASInterface::nameChanged, this, &MainToolBar::_updateName);
connect(_mav, &UASInterface::systemTypeSet, this, &MainToolBar::_setSystemType);
connect(_mav, &UASInterface::localizationChanged, this, &MainToolBar::_setSatLoc);
connect(_mav, &UASInterface::remoteControlRSSIChanged, this, &MainToolBar::_remoteControlRSSIChanged);
connect(_mav, SIGNAL(statusChanged(UASInterface*,QString,QString)), this, SLOT(_updateState(UASInterface*, QString,QString)));
connect(_mav, SIGNAL(armingChanged(bool)), this, SLOT(_updateArmingState(bool)));
if (_mav->getWaypointManager())
......@@ -347,6 +360,34 @@ void MainToolBar::_setActiveUAS(UASInterface* active)
emit mavPresentChanged(_mav != NULL);
}
void MainToolBar::_telemetryChanged(LinkInterface*, unsigned, unsigned, unsigned rssi, unsigned remrssi, unsigned, unsigned, unsigned)
{
// We only care if we haveone single connection
if(_connectionCount == 1) {
if((unsigned)_telemetryLRSSI != rssi) {
// According to the Silabs data sheet, the RSSI value is 0.5db per bit
_telemetryLRSSI = rssi >> 1;
emit telemetryLRSSIChanged(_telemetryLRSSI);
}
if((unsigned)_telemetryRRSSI != remrssi) {
// According to the Silabs data sheet, the RSSI value is 0.5db per bit
_telemetryRRSSI = remrssi >> 1;
emit telemetryRRSSIChanged(_telemetryRRSSI);
}
}
}
void MainToolBar::_remoteControlRSSIChanged(uint8_t rssi)
{
// We only care if we haveone single connection
if(_connectionCount == 1) {
if(_remoteRSSI != rssi) {
_remoteRSSI = rssi;
emit remoteRSSIChanged(_remoteRSSI);
}
}
}
void MainToolBar::_updateArmingState(bool armed)
{
if(_systemArmed != armed) {
......@@ -426,6 +467,19 @@ void MainToolBar::_updateConnection(LinkInterface *disconnectedLink)
_connectedList = connList;
emit connectedListChanged(_connectedList);
}
// Update telemetry RSSI display
if(_connectionCount != 1 && _telemetryRRSSI > 0) {
_telemetryRRSSI = 0;
emit telemetryRRSSIChanged(_telemetryRRSSI);
}
if(_connectionCount != 1 && _telemetryLRSSI > 0) {
_telemetryLRSSI = 0;
emit telemetryLRSSIChanged(_telemetryLRSSI);
}
if(_connectionCount != 1 && _remoteRSSI > 0) {
_remoteRSSI = 0;
emit remoteRSSIChanged(_remoteRSSI);
}
}
void MainToolBar::_updateState(UASInterface*, QString name, QString)
......
......@@ -37,6 +37,7 @@ This file is part of the QGROUNDCONTROL project
#define TOOL_BAR_SHOW_GPS "ShowGPS"
#define TOOL_BAR_SHOW_MAV "ShowMav"
#define TOOL_BAR_SHOW_MESSAGES "ShowMessages"
#define TOOL_BAR_SHOW_RSSI "ShowRSSI"
class UASInterface;
class UASMessage;
......@@ -96,12 +97,19 @@ public:
Q_PROPERTY(bool showMav MEMBER _showMav NOTIFY showMavChanged)
Q_PROPERTY(bool showMessages MEMBER _showMessages NOTIFY showMessagesChanged)
Q_PROPERTY(bool showBattery MEMBER _showBattery NOTIFY showBatteryChanged)
Q_PROPERTY(bool showRSSI MEMBER _showRSSI NOTIFY showRSSIChanged)
Q_PROPERTY(float progressBarValue MEMBER _progressBarValue NOTIFY progressBarValueChanged)
Q_PROPERTY(int remoteRSSI READ remoteRSSI NOTIFY remoteRSSIChanged)
Q_PROPERTY(int telemetryRRSSI READ telemetryRRSSI NOTIFY telemetryRRSSIChanged)
Q_PROPERTY(int telemetryLRSSI READ telemetryLRSSI NOTIFY telemetryLRSSIChanged)
bool mavPresent () { return _mav != NULL; }
bool mavPresent () { return _mav != NULL; }
int remoteRSSI () { return _remoteRSSI; }
int telemetryRRSSI () { return _telemetryRRSSI; }
int telemetryLRSSI () { return _telemetryLRSSI; }
void setCurrentView (int currentView);
void viewStateChanged (const QString& key, bool value);
void setCurrentView (int currentView);
void viewStateChanged (const QString& key, bool value);
signals:
void connectionCountChanged (int count);
......@@ -126,7 +134,11 @@ signals:
void showMavChanged (bool value);
void showMessagesChanged (bool value);
void showBatteryChanged (bool value);
void showRSSIChanged (bool value);
void progressBarValueChanged (float value);
void remoteRSSIChanged (int value);
void telemetryRRSSIChanged (int value);
void telemetryLRSSIChanged (int value);
private slots:
void _setActiveUAS (UASInterface* active);
......@@ -147,6 +159,8 @@ private slots:
void _leaveMessageView ();
void _setSatLoc (UASInterface* uas, int fix);
void _setProgressBarValue (float value);
void _remoteControlRSSIChanged (uint8_t rssi);
void _telemetryChanged (LinkInterface* link, unsigned rxerrors, unsigned fixed, unsigned rssi, unsigned remrssi, unsigned txbuf, unsigned noise, unsigned remnoise);
private:
void _updateConnection (LinkInterface *disconnectedLink = NULL);
......@@ -180,8 +194,12 @@ private:
bool _showGPS;
bool _showMav;
bool _showMessages;
bool _showRSSI;
bool _showBattery;
float _progressBarValue;
int _remoteRSSI;
int _telemetryRRSSI;
int _telemetryLRSSI;
UASMessageViewRollDown* _rollDownMessages;
};
......
......@@ -45,11 +45,10 @@ Rectangle {
property int cellSpacerSize: getProportionalDimmension(4)
property int cellHeight: getProportionalDimmension(30)
property int cellRadius: getProportionalDimmension(3)
property var colorBlue: "#1a6eaa"
property var colorGreen: "#079527"
property var colorRed: "#a81a1b"
property var colorGreen: "#329147"
property var colorRed: "#942324"
property var colorOrange: "#a76f26"
property var colorWhite: "#f0f0f0"
......@@ -122,6 +121,14 @@ Rectangle {
return colorGreen;
}
function getRSSIColor(value) {
if(value < 10)
return colorRed;
if(value < 50)
return colorOrange;
return colorGreen;
}
function showMavStatus() {
return (mainToolBar.mavPresent && mainToolBar.heartbeatTimeout === 0 && mainToolBar.connectionCount > 0);
}
......@@ -217,12 +224,11 @@ Rectangle {
Rectangle {
id: messages
width: (mainToolBar.messageCount > 99) ? getProportionalDimmension(70) : getProportionalDimmension(60)
width: (mainToolBar.messageCount > 99) ? getProportionalDimmension(65) : getProportionalDimmension(60)
height: cellHeight
visible: (mainToolBar.connectionCount > 0) && (mainToolBar.showMessages)
anchors.verticalCenter: parent.verticalCenter
color: getMessageColor()
radius: cellRadius
border.color: "#00000000"
border.width: 0
property bool showTriangle: false
......@@ -234,10 +240,10 @@ Rectangle {
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: getProportionalDimmension(10)
anchors.leftMargin: getProportionalDimmension(8)
}
Rectangle {
Item {
id: messageTextRect
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
......@@ -296,7 +302,6 @@ Rectangle {
visible: showMavStatus() && (mainToolBar.showMav)
anchors.verticalCenter: parent.verticalCenter
color: colorBlue
radius: cellRadius
border.color: "#00000000"
border.width: 0
Image {
......@@ -310,12 +315,11 @@ Rectangle {
Rectangle {
id: satelitte
width: getProportionalDimmension(60)
width: getProportionalDimmension(50)
height: cellHeight
visible: showMavStatus() && (mainToolBar.showGPS)
anchors.verticalCenter: parent.verticalCenter
color: getSatelliteColor();
radius: cellRadius
border.color: "#00000000"
border.width: 0
......@@ -325,32 +329,122 @@ Rectangle {
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: getProportionalDimmension(10)
anchors.leftMargin: getProportionalDimmension(6)
mipmap: true
smooth: true
}
QGCLabel {
id: satelitteText
text: (mainToolBar.satelliteCount > 0) ? mainToolBar.satelliteCount : ''
text: mainToolBar.satelliteCount
font.pointSize: screenTools.dpiAdjustedPointSize(14);
font.weight: Font.DemiBold
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: getProportionalDimmension(10)
anchors.rightMargin: getProportionalDimmension(6)
horizontalAlignment: Text.AlignRight
color: colorWhite
}
}
Rectangle {
id: rssiRC
width: getProportionalDimmension(55)
height: cellHeight
visible: showMavStatus() && mainToolBar.showRSSI && mainToolBar.remoteRSSI <= 100
anchors.verticalCenter: parent.verticalCenter
color: getRSSIColor(mainToolBar.remoteRSSI);
border.color: "#00000000"
border.width: 0
Image {
source: "qrc:/res/AntennaRC";
width: cellHeight * 0.7
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: getProportionalDimmension(6)
mipmap: true
smooth: true
}
QGCLabel {
text: mainToolBar.remoteRSSI
anchors.right: parent.right
anchors.rightMargin: getProportionalDimmension(6)
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignRight
font.pointSize: screenTools.dpiAdjustedPointSize(12);
font.weight: Font.DemiBold
color: colorWhite
}
}
Rectangle {
id: rssiTelemetry
width: getProportionalDimmension(80)
height: cellHeight
visible: showMavStatus() && (mainToolBar.showRSSI) && ((mainToolBar.telemetryRRSSI > 0) && (mainToolBar.telemetryLRSSI > 0))
anchors.verticalCenter: parent.verticalCenter
color: getRSSIColor(Math.min(mainToolBar.telemetryRRSSI,mainToolBar.telemetryLRSSI));
border.color: "#00000000"
border.width: 0
Image {
source: "qrc:/res/AntennaT";
width: cellHeight * 0.7
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: getProportionalDimmension(6)
mipmap: true
smooth: true
}
Column {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: getProportionalDimmension(6)
Row {
anchors.right: parent.right
QGCLabel {
text: 'R '
font.pointSize: screenTools.dpiAdjustedPointSize(11);
font.weight: Font.DemiBold
color: colorWhite
}
QGCLabel {
text: mainToolBar.telemetryRRSSI + 'dB'
width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight
font.pointSize: screenTools.dpiAdjustedPointSize(11);
font.weight: Font.DemiBold
color: colorWhite
}
}
Row {
anchors.right: parent.right
QGCLabel {
text: 'L '
font.pointSize: screenTools.dpiAdjustedPointSize(11);
font.weight: Font.DemiBold
color: colorWhite
}
QGCLabel {
text: mainToolBar.telemetryLRSSI + 'dB'
width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight
font.pointSize: screenTools.dpiAdjustedPointSize(11);
font.weight: Font.DemiBold
color: colorWhite
}
}
}
}
Rectangle {
id: battery
width: getProportionalDimmension(80)
width: getProportionalDimmension(60)
height: cellHeight
visible: showMavStatus() && (mainToolBar.showBattery)
anchors.verticalCenter: parent.verticalCenter
color: (mainToolBar.batteryPercent > 40.0 || mainToolBar.batteryPercent < 0.01) ? colorBlue : colorRed
radius: cellRadius
color: getBatteryColor();
border.color: "#00000000"
border.width: 0
......@@ -367,12 +461,12 @@ Rectangle {
QGCLabel {
id: batteryText
text: mainToolBar.batteryVoltage.toFixed(1) + ' V';
font.pointSize: screenTools.dpiAdjustedPointSize(14);
text: mainToolBar.batteryVoltage.toFixed(1) + 'V';
font.pointSize: screenTools.dpiAdjustedPointSize(12);
font.weight: Font.DemiBold
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: getProportionalDimmension(8)
anchors.rightMargin: getProportionalDimmension(6)
horizontalAlignment: Text.AlignRight
color: colorWhite
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment