Commit 7c6155de authored by dogmaphobic's avatar dogmaphobic

Merge remote-tracking branch 'MavLink/master' into mapScale

* MavLink/master:
  Safety Icons Tweak
  Minor copy/paste error.
  Added correct spacing
  Move id to the top
  update fixed wing cmd default values
  Clicking on the summary titles enter edit mode
  Show a more educative airframe configuration
  Parameter Edit: Handle bitfields as ComboBoxes
parents ffab89c9 42045439
......@@ -188,6 +188,11 @@ APMAirframeType *APMAirframeComponentController::currentAirframeType() const
return _currentAirframeType;
}
QString APMAirframeComponentController::currentAirframeTypeName() const
{
return _vehicle->vehicleTypeName();
}
APMAirframe *APMAirframeComponentController::currentAirframe() const
{
return _currentAirframe;
......
......@@ -70,6 +70,7 @@ signals:
public slots:
APMAirframeType *currentAirframeType() const;
Q_INVOKABLE QString currentAirframeTypeName() const;
APMAirframe *currentAirframe() const;
void setCurrentAirframeType(APMAirframeType *t);
void setCurrentAirframe(APMAirframe *t);
......
......@@ -28,11 +28,11 @@ FactPanel {
VehicleSummaryRow {
id: nameRow;
labelText: qsTr("Frame Type:")
valueText: sysIdFact.valueString === "0" ? "Plus"
valueText: controller.currentAirframeTypeName() + " " + (sysIdFact.valueString === "0" ? "Plus"
: sysIdFact.valueString === "1" ? "X"
: sysIdFact.valueString === "2" ? "V"
: sysIdFact.valueString == "3" ? "H"
:/* Fact.value == 10 */ "New Y6";
: /* Fact.value == 10 */ "New Y6");
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<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="194 896 87.1 74.8" style="enable-background:new 194 896 87.1 74.8;" xml:space="preserve">
viewBox="194 896 97.2 97.4" style="enable-background:new 194 896 97.2 97.4;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:5.4819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#A10000;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#A10000;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
.st3{fill:none;stroke:#A10000;stroke-width:6;stroke-miterlimit:10;}
</style>
<path class="st0" d="M206.2,923.3c0.3-0.6,0.8-0.9,1.5-0.9l62.1,0c0.4,0,0.7,0.1,1,0.3c0.3,0.2,0.5,0.5,0.6,0.8
c0.3,0.6,0.1,1.3-0.4,1.9l-37.2,38.7c-0.4,0.3-0.9,0.5-1.4,0.5c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.1-0.3-0.3-0.5-0.5l-9.6-15l-6.3,3
c-0.6,0.3-1.2,0.2-1.7-0.1c-0.5-0.4-0.8-0.9-0.7-1.6l1.3-12.9l-7.8-12.1C205.9,924.6,205.9,924,206.2,923.3L206.2,923.3z
M210.9,925.9l6,9.4c0,0.1,0,0.2,0.1,0.3l0.1,0.2l41.8-9.9L210.9,925.9z M217.5,937.5l-1,9.8l47.9-20.9L217.5,937.5z M223.6,946.1
c0.3,0.3,0.6,0.6,0.7,0.8l8.4,13.2l29.7-30.9L223.6,946.1z"/>
<g>
<path class="st0" d="M198.2,910.3c0.4-0.7,0.9-1,1.6-1l67.1,0.1c0.4,0,0.7,0.1,1.1,0.3c0.3,0.2,0.5,0.5,0.6,0.9
c0.3,0.7,0.1,1.4-0.4,2L228,954.5c-0.4,0.4-0.9,0.6-1.5,0.6c-0.3,0-0.6-0.2-0.9-0.3c-0.2-0.1-0.4-0.3-0.5-0.5L214.7,938l-6.9,3.2
c-0.7,0.3-1.3,0.3-1.9-0.1s-0.8-1-0.8-1.7l1.4-14l-8.4-13.1C197.9,911.6,197.9,911,198.2,910.3L198.2,910.3z M203.3,913.1l6.5,10.2
c0,0.1,0.1,0.2,0.1,0.4l0.1,0.2l45.2-10.7L203.3,913.1z M210.4,925.7l-1.1,10.6l51.8-22.6L210.4,925.7z M217.1,935
c0.3,0.3,0.6,0.6,0.8,0.9l9.1,14.3l32.1-33.4L217.1,935z"/>
<g>
<path id="path3890" inkscape:connector-curvature="0" class="st1" d="M249.8,952.8c6.2,6.2,16.4,6.2,22.7,0
c6.2-6.2,6.2-16.4,0-22.7"/>
<path id="path3892" inkscape:connector-curvature="0" class="st1" d="M255.5,945.3c2.7,2.7,7,2.7,9.7,0c2.7-2.7,2.7-7,0-9.7"/>
</g>
<path id="path3890" inkscape:connector-curvature="0" class="st1" d="M254,962.6c5.8,5.8,15.2,5.8,21,0c5.8-5.8,5.8-15.2,0-21"/>
<path id="path3892" inkscape:connector-curvature="0" class="st1" d="M259.2,955.7c2.5,2.5,6.5,2.5,9,0c2.5-2.5,2.5-6.5,0-9"/>
</g>
<g>
<line class="st2" x1="207.1" y1="963.9" x2="268" y2="903"/>
<line class="st2" x1="268" y1="963.9" x2="207.1" y2="902.9"/>
<line class="st2" x1="212.6" y1="974.6" x2="272.3" y2="914.8"/>
<circle class="st3" cx="242.6" cy="944.7" r="43.2"/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<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="194 896 87.1 74.8" style="enable-background:new 194 896 87.1 74.8;" xml:space="preserve">
viewBox="194 896 97.2 97.4" style="enable-background:new 194 896 97.2 97.4;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:5.4819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#CB2027;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#CB2027;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#CB2027;stroke-width:6;stroke-miterlimit:10;}
</style>
<path d="M198.2,910.3c0.4-0.7,0.9-1,1.6-1l67.1,0.1c0.4,0,0.7,0.1,1.1,0.3c0.3,0.2,0.5,0.5,0.6,0.9c0.3,0.7,0.1,1.4-0.4,2L228,954.5
c-0.4,0.4-0.9,0.6-1.5,0.6c-0.3,0-0.6-0.2-0.9-0.3c-0.2-0.1-0.4-0.3-0.5-0.5L214.7,938l-6.9,3.2c-0.7,0.3-1.3,0.3-1.9-0.1
s-0.8-1-0.8-1.7l1.4-14l-8.4-13.1C197.9,911.6,197.9,911,198.2,910.3L198.2,910.3z M203.3,913.1l6.5,10.2c0,0.1,0.1,0.2,0.1,0.4
l0.1,0.2l45.2-10.7L203.3,913.1z M210.4,925.7l-1.1,10.6l51.8-22.6L210.4,925.7z M217.1,935c0.3,0.3,0.6,0.6,0.8,0.9l9.1,14.3
l32.1-33.4L217.1,935z"/>
<g>
<path id="path3890" inkscape:connector-curvature="0" class="st0" d="M249.8,952.8c6.2,6.2,16.4,6.2,22.7,0
c6.2-6.2,6.2-16.4,0-22.7"/>
<path id="path3892" inkscape:connector-curvature="0" class="st0" d="M255.5,945.3c2.7,2.7,7,2.7,9.7,0c2.7-2.7,2.7-7,0-9.7"/>
<path d="M206.2,923.3c0.3-0.6,0.8-0.9,1.5-0.9l62.1,0c0.4,0,0.7,0.1,1,0.3c0.3,0.2,0.5,0.5,0.6,0.8c0.3,0.6,0.1,1.3-0.4,1.9
l-37.2,38.7c-0.4,0.3-0.9,0.5-1.4,0.5c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.1-0.3-0.3-0.5-0.5l-9.6-15l-6.3,3c-0.6,0.3-1.2,0.2-1.7-0.1
c-0.5-0.4-0.8-0.9-0.7-1.6l1.3-12.9l-7.8-12.1C205.9,924.6,205.9,924,206.2,923.3L206.2,923.3z M210.9,925.9l6,9.4
c0,0.1,0,0.2,0.1,0.3l0.1,0.2l41.8-9.9L210.9,925.9z M217.5,937.5l-1,9.8l47.9-20.9L217.5,937.5z M223.6,946.1
c0.3,0.3,0.6,0.6,0.7,0.8l8.4,13.2l29.7-30.9L223.6,946.1z"/>
<g>
<path id="path3890" inkscape:connector-curvature="0" class="st0" d="M254,962.6c5.8,5.8,15.2,5.8,21,0c5.8-5.8,5.8-15.2,0-21"/>
<path id="path3892" inkscape:connector-curvature="0" class="st0" d="M259.2,955.7c2.5,2.5,6.5,2.5,9,0c2.5-2.5,2.5-6.5,0-9"/>
</g>
</g>
<g>
<line class="st1" x1="207.1" y1="963.9" x2="268" y2="903"/>
<line class="st1" x1="268" y1="963.9" x2="207.1" y2="902.9"/>
<line class="st1" x1="212.6" y1="974.6" x2="272.3" y2="914.8"/>
<circle class="st2" cx="242.6" cy="944.7" r="43.2"/>
</g>
</svg>
......@@ -2,8 +2,8 @@
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg3852" inkscape:version="0.91 r13725" sodipodi:docname="gps.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-250 452 78.5 81.4"
style="enable-background:new -250 452 78.5 81.4;" xml:space="preserve">
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-250 452 97.2 97.2"
style="enable-background:new -250 452 97.2 97.2;" xml:space="preserve">
<style type="text/css">
.st0{display:none;}
.st1{display:inline;}
......@@ -12,7 +12,8 @@
.st4{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st5{fill:#FFFFFF;stroke:#FFFFFF;stroke-miterlimit:10;}
.st6{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st7{fill:none;stroke:#A10000;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
.st7{fill:none;stroke:#A10000;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
.st8{fill:none;stroke:#A10000;stroke-width:6;stroke-miterlimit:10;}
</style>
<title id="title4758">GPS</title>
<sodipodi:namedview bordercolor="#666666" borderopacity="1" gridtolerance="10" guidetolerance="10" id="namedview3929" inkscape:current-layer="svg3852" inkscape:cx="55" inkscape:cy="55" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="480" inkscape:window-width="640" inkscape:zoom="11.136364" objecttolerance="10" pagecolor="#808080" showgrid="false">
......@@ -68,15 +69,15 @@
-251.5,446.7 -264.6,446.7 "/>
</g>
<g>
<line class="st4" x1="-211.3" y1="484.9" x2="-211.4" y2="459.4"/>
<circle class="st5" cx="-227.8" cy="506.7" r="5.2"/>
<path class="st6" d="M-240.5,487.5V526h59.6v-38.5H-240.5z M-227.8,517.8c-6.1,0-11.1-4.9-11.1-11.1s4.9-11.1,11.1-11.1
c6.1,0,11.1,4.9,11.1,11.1S-221.7,517.8-227.8,517.8z M-193.7,517.8c-6.1,0-11.1-4.9-11.1-11.1s4.9-11.1,11.1-11.1
c6.1,0,11.1,4.9,11.1,11.1S-187.6,517.8-193.7,517.8z"/>
<circle class="st5" cx="-193.7" cy="506.7" r="5.2"/>
<line class="st4" x1="-201.8" y1="494" x2="-201.9" y2="472.4"/>
<circle class="st5" cx="-215.8" cy="512.5" r="4.4"/>
<path class="st6" d="M-226.6,496.2v32.6h50.4v-32.6H-226.6z M-215.8,521.8c-5.2,0-9.4-4.2-9.4-9.4c0-5.2,4.2-9.4,9.4-9.4
c5.2,0,9.4,4.2,9.4,9.4C-206.5,517.6-210.7,521.8-215.8,521.8z M-187,521.8c-5.2,0-9.4-4.2-9.4-9.4c0-5.2,4.2-9.4,9.4-9.4
c5.2,0,9.4,4.2,9.4,9.4C-177.6,517.6-181.8,521.8-187,521.8z"/>
<circle class="st5" cx="-187" cy="512.5" r="4.4"/>
</g>
<g>
<line class="st7" x1="-243.2" y1="525.1" x2="-178.4" y2="460.3"/>
<line class="st7" x1="-178.4" y1="525.1" x2="-243.2" y2="460.3"/>
<line class="st7" x1="-231.4" y1="530.5" x2="-171.7" y2="470.7"/>
<circle class="st8" cx="-201.4" cy="500.6" r="43.2"/>
</g>
</svg>
......@@ -2,17 +2,18 @@
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg3852" inkscape:version="0.91 r13725" sodipodi:docname="gps.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-250 452 78.5 81.4"
style="enable-background:new -250 452 78.5 81.4;" xml:space="preserve">
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-250 452 97.2 97.2"
style="enable-background:new -250 452 97.2 97.2;" xml:space="preserve">
<style type="text/css">
.st0{display:none;}
.st1{display:inline;}
.st2{fill:none;stroke:#EB008B;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st3{display:inline;fill:none;stroke:#224A80;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st4{stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st4{fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st5{stroke:#000000;stroke-miterlimit:10;}
.st6{stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st7{fill:none;stroke:#CB2027;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
.st7{fill:none;stroke:#CB2027;stroke-width:6;stroke-linecap:round;stroke-miterlimit:10;}
.st8{fill:none;stroke:#CB2027;stroke-width:6;stroke-miterlimit:10;}
</style>
<title id="title4758">GPS</title>
<sodipodi:namedview bordercolor="#666666" borderopacity="1" gridtolerance="10" guidetolerance="10" id="namedview3929" inkscape:current-layer="svg3852" inkscape:cx="55" inkscape:cy="55" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="480" inkscape:window-width="640" inkscape:zoom="11.136364" objecttolerance="10" pagecolor="#808080" showgrid="false">
......@@ -68,15 +69,15 @@
-251.5,446.7 -264.6,446.7 "/>
</g>
<g>
<line class="st4" x1="-211.3" y1="484.9" x2="-211.4" y2="459.4"/>
<circle class="st5" cx="-227.8" cy="506.7" r="5.2"/>
<path class="st6" d="M-240.5,487.5V526h59.6v-38.5H-240.5z M-227.8,517.8c-6.1,0-11.1-4.9-11.1-11.1s4.9-11.1,11.1-11.1
c6.1,0,11.1,4.9,11.1,11.1S-221.7,517.8-227.8,517.8z M-193.7,517.8c-6.1,0-11.1-4.9-11.1-11.1s4.9-11.1,11.1-11.1
c6.1,0,11.1,4.9,11.1,11.1S-187.6,517.8-193.7,517.8z"/>
<circle class="st5" cx="-193.7" cy="506.7" r="5.2"/>
<line class="st4" x1="-201.8" y1="494" x2="-201.9" y2="472.4"/>
<circle class="st5" cx="-215.8" cy="512.5" r="4.4"/>
<path class="st6" d="M-226.6,496.2v32.6h50.4v-32.6H-226.6z M-215.8,521.8c-5.2,0-9.4-4.2-9.4-9.4c0-5.2,4.2-9.4,9.4-9.4
c5.2,0,9.4,4.2,9.4,9.4C-206.5,517.6-210.7,521.8-215.8,521.8z M-187,521.8c-5.2,0-9.4-4.2-9.4-9.4c0-5.2,4.2-9.4,9.4-9.4
c5.2,0,9.4,4.2,9.4,9.4C-177.6,517.6-181.8,521.8-187,521.8z"/>
<circle class="st5" cx="-187" cy="512.5" r="4.4"/>
</g>
<g>
<line class="st7" x1="-243.2" y1="525.1" x2="-178.4" y2="460.3"/>
<line class="st7" x1="-178.4" y1="525.1" x2="-243.2" y2="460.3"/>
<line class="st7" x1="-231.4" y1="530.5" x2="-171.7" y2="470.7"/>
<circle class="st8" cx="-201.4" cy="500.6" r="43.2"/>
</g>
</svg>
......@@ -128,7 +128,7 @@ QGCView {
}
Row {
QGCLabel {
anchors.baseline: batLowLevelField.baseline
anchors.baseline: batCritLevelField.baseline
width: _middleRowWidth
text: qsTr("Battery Failsafe Level:")
}
......
{
"version": 1,
"mavCmdInfo": [
{
"id": 16,
"rawName": "MAV_CMD_NAV_WAYPOINT",
"friendlyName": "Waypoint",
"description": "Travel to a position in 3D space.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Hold:",
"units": "seconds",
"default": 0,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 17,
"rawName": "MAV_CMD_NAV_LOITER_UNLIM",
"friendlyName": "Loiter",
"description": "Travel to a position and Loiter around the specified radius indefinitely.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 18,
"rawName": "MAV_CMD_NAV_LOITER_TURNS",
"friendlyName": "Loiter (turns)",
"description": "Travel to a position and Loiter around the specified radius for a number of turns.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param1": {
"label": "Turns:",
"default": 1,
"decimalPlaces": 0
},
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 19,
"rawName": "MAV_CMD_NAV_LOITER_TIME",
"friendlyName": "Loiter (time)",
"description": "Travel to a position and Loiter around the specified radius for a number of seconds.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param1": {
"label": "Seconds:",
"units": "seconds",
"default": 30,
"decimalPlaces": 1
},
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 21,
"rawName": "MAV_CMD_NAV_LAND",
"friendlyName": "Land",
"description": "Land vehicle at the specified location.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Abort Alt:",
"units": "meters",
"default": 25,
"decimalPlaces": 0
},
"param4": {
"label": "Heading:",
"units": "radians",
"default": 0,
"decimalPlaces": 2
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 0,
"decimalPlaces": 1
}
},
{
"id": 22,
"rawName": "MAV_CMD_NAV_TAKEOFF",
"friendlyName": "Takeoff",
"description": "Take off from the ground and travel towards the specified position.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Pitch:",
"units": "degrees",
"default": 0,
"decimalPlaces": 0
},
"param4": {
"label": "Heading:",
"units": "radians",
"default": 0,
"decimalPlaces": 1
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 25,
"decimalPlaces": 0
}
},
{
"id": 206,
"rawName": "MAV_CMD_DO_SET_CAM_TRIGG_DIST",
"friendlyName": "Camera trigger distance",
"description": "Set camera trigger distance.",
"category": "Camera",
"param1": {
"label": "Distance:",
"default": 25,
"units": "meters",
"decimalPlaces": 1
}
}
]
}
{
"version": 1,
"mavCmdInfo": [
{
"id": 16,
"rawName": "MAV_CMD_NAV_WAYPOINT",
"friendlyName": "Waypoint",
"description": "Travel to a position in 3D space.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Hold:",
"units": "seconds",
"default": 0,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 17,
"rawName": "MAV_CMD_NAV_LOITER_UNLIM",
"friendlyName": "Loiter",
"description": "Travel to a position and Loiter around the specified radius indefinitely.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 18,
"rawName": "MAV_CMD_NAV_LOITER_TURNS",
"friendlyName": "Loiter (turns)",
"description": "Travel to a position and Loiter around the specified radius for a number of turns.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param1": {
"label": "Turns:",
"default": 1,
"decimalPlaces": 0
},
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 19,
"rawName": "MAV_CMD_NAV_LOITER_TIME",
"friendlyName": "Loiter (time)",
"description": "Travel to a position and Loiter around the specified radius for a number of seconds.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Loiter",
"param1": {
"label": "Seconds:",
"units": "seconds",
"default": 30,
"decimalPlaces": 1
},
"param3": {
"label": "Radius:",
"units": "meters",
"default": 100,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 50,
"decimalPlaces": 0
}
},
{
"id": 21,
"rawName": "MAV_CMD_NAV_LAND",
"friendlyName": "Land",
"description": "Land vehicle at the specified location.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Abort Alt:",
"units": "meters",
"default": 25,
"decimalPlaces": 0
},
"param4": {
"label": "Heading:",
"units": "radians",
"default": 0,
"decimalPlaces": 2
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 0,
"decimalPlaces": 1
}
},
{
"id": 22,
"rawName": "MAV_CMD_NAV_TAKEOFF",
"friendlyName": "Takeoff",
"description": "Take off from the ground and travel towards the specified position.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Basic",
"param1": {
"label": "Pitch:",
"units": "degrees",
"default": 0,
"decimalPlaces": 0
},
"param4": {
"label": "Heading:",
"units": "radians",
"default": 0,
"decimalPlaces": 1
},
"param7": {
"label": "Altitude:",
"units": "meters",
"default": 25,
"decimalPlaces": 0
}
},
{
"id": 206,
"rawName": "MAV_CMD_DO_SET_CAM_TRIGG_DIST",
"friendlyName": "Camera trigger distance",
"description": "Set camera trigger distance.",
"category": "Camera",
"param1": {
"label": "Distance:",
"default": 25,
"units": "meters",
"decimalPlaces": 1
}
}
]
}
......@@ -409,7 +409,7 @@
},
"param2": {
"label": "Repeat:",
"default": 0,
"default": 10,
"decimalPlaces": 0
}
},
......
......@@ -987,11 +987,18 @@ bool MissionController::_findLastAltitude(double* lastAltitude)
// Don't use home position
for (int i=1; i<_visualItems->count(); i++) {
VisualMissionItem* item = qobject_cast<VisualMissionItem*>(_visualItems->get(i));
VisualMissionItem* visualItem = qobject_cast<VisualMissionItem*>(_visualItems->get(i));
if (item->specifiesCoordinate() && !item->isStandaloneCoordinate()) {
foundAltitude = item->exitCoordinate().altitude();
if (visualItem->specifiesCoordinate() && !visualItem->isStandaloneCoordinate()) {
foundAltitude = visualItem->exitCoordinate().altitude();
found = true;
if (visualItem->isSimpleItem()) {
SimpleMissionItem* simpleItem = qobject_cast<SimpleMissionItem*>(visualItem);
if ((MAV_CMD)simpleItem->command() == MAV_CMD_NAV_TAKEOFF) {
found = false;
}
}
}
}
......
......@@ -47,7 +47,18 @@ QGCViewDialog {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
function accept() {
if (factCombo.visible) {
if (bitmaskEditor.visible) {
var value = 0;
for (var i = 0; i < fact.bitmaskValues.length; ++i) {
var checkbox = bitmaskEditor.itemAt(i)
if (checkbox.checked) {
value |= fact.bitmaskValues[i];
}
}
fact.value = value;
fact.valueChanged(fact.value)
}
else if (factCombo.visible) {
fact.enumIndex = factCombo.currentIndex
hideDialog()
} else {
......@@ -127,7 +138,7 @@ QGCViewDialog {
visible: _showCombo
model: fact.enumStrings
property bool _showCombo: fact.enumStrings.length != 0 && !validate
property bool _showCombo: fact.enumStrings.length != 0 && fact.bitmaskStrings.length == 0 && !validate
Component.onCompleted: {
// We can't bind directly to fact.enumIndex since that would add an unknown value
......@@ -138,6 +149,19 @@ QGCViewDialog {
}
}
Column {
spacing: ScreenTools.defaultFontPixelHeight / 2
Repeater {
id: bitmaskEditor
model: fact.bitmaskStrings
delegate : QGCCheckBox {
text : modelData
checked : fact.value & fact.bitmaskValues[index]
}
}
}
QGCLabel { text: fact.name }
Row {
......
......@@ -1420,6 +1420,40 @@ void Vehicle::_setCoordinateValid(bool coordinateValid)
}
}
QString Vehicle::vehicleTypeName() const {
static QMap<int, QString> typeNames = {
{ MAV_TYPE_GENERIC, tr("Generic micro air vehicle" )},
{ MAV_TYPE_FIXED_WING, tr("Fixed wing aircraft")},
{ MAV_TYPE_QUADROTOR, tr("Quadrotor")},
{ MAV_TYPE_COAXIAL, tr("Coaxial helicopter")},
{ MAV_TYPE_HELICOPTER, tr("Normal helicopter with tail rotor.")},
{ MAV_TYPE_ANTENNA_TRACKER, tr("Ground installation")},
{ MAV_TYPE_GCS, tr("Operator control unit / ground control station")},
{ MAV_TYPE_AIRSHIP, tr("Airship, controlled")},
{ MAV_TYPE_FREE_BALLOON, tr("Free balloon, uncontrolled")},
{ MAV_TYPE_ROCKET, tr("Rocket")},
{ MAV_TYPE_GROUND_ROVER, tr("Ground rover")},
{ MAV_TYPE_SURFACE_BOAT, tr("Surface vessel, boat, ship")},
{ MAV_TYPE_SUBMARINE, tr("Submarine")},
{ MAV_TYPE_HEXAROTOR, tr("Hexarotor")},
{ MAV_TYPE_OCTOROTOR, tr("Octorotor")},
{ MAV_TYPE_TRICOPTER, tr("Octorotor")},
{ MAV_TYPE_FLAPPING_WING, tr("Flapping wing")},
{ MAV_TYPE_KITE, tr("Flapping wing")},
{ MAV_TYPE_ONBOARD_CONTROLLER, tr("Onboard companion controller")},
{ MAV_TYPE_VTOL_DUOROTOR, tr("Two-rotor VTOL using control surfaces in vertical operation in addition. Tailsitter")},
{ MAV_TYPE_VTOL_QUADROTOR, tr("Quad-rotor VTOL using a V-shaped quad config in vertical operation. Tailsitter")},
{ MAV_TYPE_VTOL_TILTROTOR, tr("Tiltrotor VTOL")},
{ MAV_TYPE_VTOL_RESERVED2, tr("VTOL reserved 2")},
{ MAV_TYPE_VTOL_RESERVED3, tr("VTOL reserved 3")},
{ MAV_TYPE_VTOL_RESERVED4, tr("VTOL reserved 4")},
{ MAV_TYPE_VTOL_RESERVED5, tr("VTOL reserved 5")},
{ MAV_TYPE_GIMBAL, tr("Onboard gimbal")},
{ MAV_TYPE_ADSB, tr("Onboard ADSB peripheral")},
};
return typeNames[_vehicleType];
}
/// Returns the string to speak to identify the vehicle
QString Vehicle::_vehicleIdSpeech(void)
{
......
......@@ -395,6 +395,7 @@ public:
int id(void) { return _id; }
MAV_AUTOPILOT firmwareType(void) const { return _firmwareType; }
MAV_TYPE vehicleType(void) const { return _vehicleType; }
Q_INVOKABLE QString vehicleTypeName(void) const;
/// Returns the highest quality link available to the Vehicle
LinkInterface* priorityLink(void);
......
......@@ -36,6 +36,7 @@ import QGroundControl.ScreenTools 1.0
import QGroundControl.MultiVehicleManager 1.0
Rectangle {
id: setupView
color: qgcPal.window
z: QGroundControl.zOrderTopMost
......@@ -110,6 +111,13 @@ Rectangle {
panelLoader.sourceComponent = messagePanelComponent
} else {
panelLoader.source = vehicleComponent.setupSource
for(var i = 0; i < componentRepeater.count; i++) {
var obj = componentRepeater.itemAt(i);
if (obj.text === vehicleComponent.name) {
obj.checked = true;
break;
}
}
}
}
}
......@@ -296,7 +304,6 @@ Rectangle {
text: modelData.name
visible: modelData.setupSource.toString() != ""
onClicked: showVehicleComponentPanel(modelData)
}
}
......
......@@ -117,19 +117,11 @@ Rectangle {
readonly property real titleHeight: ScreenTools.defaultFontPixelHeight * 2
// Title bar
Rectangle {
QGCButton {
id: titleBar
width: parent.width
height: titleHeight
color: qgcPal.windowShade
// Title text
QGCLabel {
anchors.fill: parent
verticalAlignment: TextEdit.AlignVCenter
horizontalAlignment: TextEdit.AlignHCenter
text: capitalizeWords(modelData.name)
}
text: capitalizeWords(modelData.name)
// Setup indicator
Rectangle {
......@@ -142,6 +134,10 @@ Rectangle {
color: modelData.setupComplete ? "#00d932" : "red"
visible: modelData.requiresSetup
}
onClicked : {
setupView.showVehicleComponentPanel(modelData)
}
}
// Summary Qml
......
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