1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 04:15:28 +03:00

Waypoint OOP version 1.2

This commit is contained in:
ArnoTlse 2021-04-04 17:01:43 +02:00
parent 69dd99a476
commit 739caeb49b
10 changed files with 955 additions and 107 deletions

View file

@ -3130,6 +3130,9 @@
"missionTemplateHead": {
"message": "Mission template"
},
"missionActionMenuHead": {
"message": "Action Menu"
},
"useOnlyStandalone": {
"message": "Use stand-alone application.<br> Please visit the <a href=\"https://github.com/iNavFlight/inav-configurator/releases\" target=\"_blank\">website</a> to read the release notes and download."
},
@ -3596,7 +3599,10 @@
"message": "JUMP settings incorrect : Check it again!"
},
"MissionPlannerHeadSettingsCheck": {
"message": "Heading value is incorrect : Check it again !"
"message": "Heading value is incorrect : Check it again! Being forced by default to -1 thence!"
},
"MissionPlannerRTHSettingsCheck": {
"message": "RTH option is incorrect : Should be 0 or 1. Check it again! Being forced by default to 0, i.e no LAND after RTH!"
},
"SafehomeSelected": {
"message": ""

View file

@ -21,7 +21,7 @@
inkscape:export-ydpi="74"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs17"><marker
style="overflow:visible"
id="marker1338"
@ -149,11 +149,11 @@
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:inline;opacity:1;filter:url(#filter3685)"><path
id="path1846"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 70 5 A 65 65 0 0 0 5 70 A 65 65 0 0 0 70 135 A 65 65 0 0 0 135 70 A 65 65 0 0 0 70 5 z M 67 17.5 L 73 17.5 C 77.155 17.5 80.5 20.845 80.5 25 L 80.5 59.398438 L 114.89844 59.072266 C 119.05325 59.032732 122.42922 62.345188 122.46875 66.5 L 122.52539 72.5 C 122.56492 76.654812 119.25247 80.032732 115.09766 80.072266 L 80.5 80.400391 L 80.5 115 C 80.5 119.155 77.155 122.5 73 122.5 L 67 122.5 C 62.845 122.5 59.5 119.155 59.5 115 L 59.5 80.601562 L 25.101562 80.927734 C 20.946751 80.967268 17.570784 77.654812 17.53125 73.5 L 17.474609 67.5 C 17.435076 63.345188 20.747532 59.967268 24.902344 59.927734 L 59.5 59.599609 L 59.5 25 C 59.5 20.845 62.845 17.5 67 17.5 z M 39.935547 26.621094 C 40.445195 26.661384 40.939184 26.896967 41.298828 27.318359 L 44.828125 31.453125 C 41.534162 27.734442 40.368277 26.642578 39.847656 26.642578 C 39.385717 26.642578 38.620743 27.085196 37.316406 28.085938 L 38.478516 27.09375 C 38.899908 26.734106 39.425899 26.580801 39.935547 26.621094 z M 100.06445 26.621094 C 100.5741 26.580804 101.10009 26.734106 101.52148 27.09375 L 102.52148 27.947266 C 101.3243 27.052781 100.54498 26.643919 99.949219 26.640625 C 99.987888 26.635277 100.02555 26.62417 100.06445 26.621094 z M 31.119141 33.376953 C 29.863336 34.564454 29.419495 35.173447 29.416016 35.666016 C 29.440295 35.133428 29.671657 34.611573 30.111328 34.236328 L 31.119141 33.376953 z M 108.99023 33.46875 L 109.88867 34.236328 C 110.21621 34.515868 110.42883 34.877712 110.52734 35.263672 C 110.32476 34.838621 109.85284 34.287032 108.99023 33.46875 z M 29.416016 35.677734 C 29.420464 36.145828 30.823937 38.02784 34.210938 42.119141 L 29.888672 37.054688 C 29.547379 36.654797 29.396775 36.162276 29.416016 35.677734 z M 110.47461 36.414062 C 110.39488 36.641236 110.27753 36.859943 110.11133 37.054688 L 106.75195 40.990234 C 108.88234 38.434823 110.29762 36.703272 110.47461 36.414062 z M 31.175781 106.4375 C 30.293996 107.51103 29.733637 108.21312 29.677734 108.32812 C 29.423857 108.85037 29.401471 109.40758 29.613281 109.94531 C 29.717348 110.20952 30.599168 111.08712 31.707031 112.125 L 30.111328 110.76367 C 29.268543 110.04438 29.169383 108.7881 29.888672 107.94531 L 31.175781 106.4375 z M 110.08008 107.91016 L 110.11133 107.94531 C 110.22466 108.0781 110.31178 108.22345 110.38477 108.37305 C 110.3017 108.22969 110.20486 108.08045 110.08008 107.91016 z M 110.46875 109.9082 C 110.35523 110.22799 110.16651 110.52655 109.88867 110.76367 L 108.91406 111.5957 C 109.70516 110.84296 110.26814 110.24226 110.46875 109.9082 z M 97.589844 116.37891 C 98.508616 117.38803 99.077824 117.9543 99.419922 118.20898 C 99.152396 118.09105 98.904254 117.91959 98.701172 117.68164 L 97.589844 116.37891 z M 103.25977 116.42188 L 101.52148 117.90625 C 101.22073 118.16293 100.8671 118.31002 100.50391 118.36133 C 101.04659 118.08855 102.07668 117.3442 103.25977 116.42188 z M 38.306641 117.75977 C 38.640342 118.01172 38.941415 118.18864 39.222656 118.30273 C 38.957484 118.22604 38.702824 118.09769 38.478516 117.90625 L 38.306641 117.75977 z " /></g><g
style="display:inline;opacity:1;filter:url(#filter3685)" /><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="opacity:0.992325" /></svg>
style="opacity:0.992325"><path
id="rect3692"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:8.27818;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="M 57.5 17.5 C 53.345 17.5 50 20.845 50 25 L 50 50 L 25 50 C 20.845 50 17.5 53.345 17.5 57.5 L 17.5 82.5 C 17.5 86.655 20.845 90 25 90 L 50 90 L 50 115 C 50 119.155 53.345 122.5 57.5 122.5 L 82.5 122.5 C 86.655 122.5 90 119.155 90 115 L 90 90 L 115 90 C 119.155 90 122.5 86.655 122.5 82.5 L 122.5 57.5 C 122.5 53.345 119.155 50 115 50 L 90 50 L 90 25 C 90 20.845 86.655 17.5 82.5 17.5 L 57.5 17.5 z " /></g></svg>

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

@ -110,7 +110,17 @@
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path856" /></marker></defs><sodipodi:namedview
id="path856" /></marker><filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter3685"
x="-2.1675e-05"
width="1.0000434"
y="-2.1675e-05"
height="1.0000434"><feGaussianBlur
inkscape:collect="always"
stdDeviation="0.0011740625"
id="feGaussianBlur3687" /></filter></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
@ -129,7 +139,7 @@
inkscape:window-x="-6"
inkscape:window-y="-6"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:current-layer="layer2"
inkscape:snap-grids="true"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
@ -139,15 +149,11 @@
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:inline;opacity:1"><path
id="path1846"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 70 5 A 65 65 0 0 0 5 70 A 65 65 0 0 0 70 135 A 65 65 0 0 0 135 70 A 65 65 0 0 0 70 5 z M 39.935547 26.621094 C 40.445195 26.661386 40.939184 26.896967 41.298828 27.318359 L 70 60.947266 L 98.701172 27.318359 C 99.060816 26.896967 99.554811 26.661386 100.06445 26.621094 C 100.5741 26.580801 101.10009 26.734106 101.52148 27.09375 L 109.88867 34.236328 C 110.73146 34.955617 110.83062 36.211902 110.11133 37.054688 L 79.859375 72.5 L 110.11133 107.94531 C 110.83062 108.7881 110.73146 110.04438 109.88867 110.76367 L 101.52148 117.90625 C 100.6787 118.62554 99.420461 118.52443 98.701172 117.68164 L 70 84.052734 L 41.298828 117.68164 C 40.579539 118.52443 39.321301 118.62554 38.478516 117.90625 L 30.111328 110.76367 C 29.268543 110.04438 29.169383 108.7881 29.888672 107.94531 L 60.140625 72.5 L 29.888672 37.054688 C 29.169383 36.211902 29.268543 34.955617 30.111328 34.236328 L 38.478516 27.09375 C 38.899908 26.734106 39.425899 26.580801 39.935547 26.621094 z " /></g><g
style="display:inline;opacity:1;filter:url(#filter3685)" /><g
inkscape:groupmode="layer"
id="layer3"
id="layer2"
inkscape:label="Layer 2"
style="display:inline" /><g
inkscape:groupmode="layer"
id="g1894"
inkscape:label="Copie de Layer 2"
style="display:inline" /></svg>
style="opacity:0.992325"><path
id="rect3692"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:8.27818;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="m 98.284271,24.038059 c -2.938028,-2.938028 -7.668573,-2.938028 -10.606601,0 L 70,41.715729 52.32233,24.038059 c -2.938028,-2.938028 -7.668573,-2.938028 -10.606601,0 l -17.67767,17.67767 c -2.938028,2.938028 -2.938028,7.668573 0,10.606601 L 41.715729,70 24.038059,87.67767 c -2.938028,2.938028 -2.938028,7.668573 0,10.606601 l 17.67767,17.677669 c 2.938028,2.93803 7.668573,2.93803 10.606601,0 L 70,98.284271 87.67767,115.96194 c 2.938028,2.93803 7.668573,2.93803 10.606601,0 L 115.96194,98.284271 c 2.93803,-2.938028 2.93803,-7.668573 0,-10.606601 L 98.284271,70 115.96194,52.32233 c 2.93803,-2.938028 2.93803,-7.668573 0,-10.606601 z" /></g></svg>

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before After
Before After

View file

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 141.7 141.7"
enable-background="new 0 0 141.7 141.7"
xml:space="preserve"
sodipodi:docname="cf_icon_MP_hide_grey.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\Users\arnau\Documents\GitHub\inav-configurator\images\icons\cf_icon_MP_save2file.png"
inkscape:export-xdpi="74"
inkscape:export-ydpi="74"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17"><marker
style="overflow:visible"
id="marker1338"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1336" /></marker><marker
style="overflow:visible"
id="marker1292"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1290" /></marker><marker
style="overflow:visible"
id="marker1252"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1250" /></marker><marker
style="overflow:visible"
id="marker1218"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1216" /></marker><marker
style="overflow:visible"
id="marker1172"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1170" /></marker><marker
style="overflow:visible"
id="marker1150"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1148" /></marker><marker
style="overflow:visible"
id="marker1128"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1126" /></marker><marker
style="overflow:visible"
id="Arrow1Lstart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path856" /></marker><filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter3685"
x="-2.1675e-05"
width="1.0000434"
y="-2.1675e-05"
height="1.0000434"><feGaussianBlur
inkscape:collect="always"
stdDeviation="0.0011740625"
id="feGaussianBlur3687" /></filter></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1368"
inkscape:window-height="850"
id="namedview15"
showgrid="true"
inkscape:zoom="2.8743367"
inkscape:cx="77.947778"
inkscape:cy="74.480095"
inkscape:window-x="-6"
inkscape:window-y="-6"
inkscape:window-maximized="1"
inkscape:current-layer="layer3"
inkscape:snap-grids="true"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid1409" /></sodipodi:namedview>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:none;opacity:1;filter:url(#filter3685)" /><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:none;opacity:0.992325" /><g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3"
style="display:inline"><path
sodipodi:type="star"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path4372"
sodipodi:sides="3"
sodipodi:cx="-70.849998"
sodipodi:cy="-82.137498"
sodipodi:r1="60"
sodipodi:r2="30"
sodipodi:arg1="1.5707963"
sodipodi:arg2="2.6179939"
inkscape:flatsided="true"
inkscape:rounded="0.11"
inkscape:randomized="0"
d="m -70.849997,-22.137497 c -11.431535,0 -57.677293,-80.100003 -51.961523,-90.000003 5.71576,-9.9 98.207277,-9.9 103.923045,0 5.715768,9.9 -40.529987,90.000003 -51.961522,90.000003 z"
inkscape:transform-center-y="-15"
transform="scale(-1)"
inkscape:transform-center-x="-1.4795814e-06" /></g></svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 141.7 141.7"
enable-background="new 0 0 141.7 141.7"
xml:space="preserve"
sodipodi:docname="cf_icon_MP_reduce_grey.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\Users\arnau\Documents\GitHub\inav-configurator\images\icons\cf_icon_MP_save2file.png"
inkscape:export-xdpi="74"
inkscape:export-ydpi="74"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17"><marker
style="overflow:visible"
id="marker1338"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1336" /></marker><marker
style="overflow:visible"
id="marker1292"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1290" /></marker><marker
style="overflow:visible"
id="marker1252"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1250" /></marker><marker
style="overflow:visible"
id="marker1218"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1216" /></marker><marker
style="overflow:visible"
id="marker1172"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1170" /></marker><marker
style="overflow:visible"
id="marker1150"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1148" /></marker><marker
style="overflow:visible"
id="marker1128"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1126" /></marker><marker
style="overflow:visible"
id="Arrow1Lstart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path856" /></marker><filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter3685"
x="-2.1675e-05"
width="1.0000434"
y="-2.1675e-05"
height="1.0000434"><feGaussianBlur
inkscape:collect="always"
stdDeviation="0.0011740625"
id="feGaussianBlur3687" /></filter></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1368"
inkscape:window-height="850"
id="namedview15"
showgrid="true"
inkscape:zoom="2.8743367"
inkscape:cx="77.947778"
inkscape:cy="74.480095"
inkscape:window-x="-6"
inkscape:window-y="-6"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:snap-grids="true"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid1409" /></sodipodi:namedview>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:inline;opacity:1;filter:url(#filter3685)"><path
id="path1846"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 70 5 A 65 65 0 0 0 5 70 A 65 65 0 0 0 70 135 A 65 65 0 0 0 135 70 A 65 65 0 0 0 70 5 z M 39.935547 26.621094 C 40.445195 26.661384 40.939184 26.896967 41.298828 27.318359 L 44.828125 31.453125 C 41.534162 27.734442 40.368277 26.642578 39.847656 26.642578 C 39.385717 26.642578 38.620743 27.085196 37.316406 28.085938 L 38.478516 27.09375 C 38.899908 26.734106 39.425899 26.580801 39.935547 26.621094 z M 100.06445 26.621094 C 100.5741 26.580804 101.10009 26.734106 101.52148 27.09375 L 102.52148 27.947266 C 101.3243 27.052781 100.54498 26.643919 99.949219 26.640625 C 99.987888 26.635277 100.02555 26.62417 100.06445 26.621094 z M 31.119141 33.376953 C 29.863336 34.564454 29.419495 35.173447 29.416016 35.666016 C 29.440295 35.133428 29.671657 34.611573 30.111328 34.236328 L 31.119141 33.376953 z M 108.99023 33.46875 L 109.88867 34.236328 C 110.21621 34.515868 110.42883 34.877712 110.52734 35.263672 C 110.32476 34.838621 109.85284 34.287032 108.99023 33.46875 z M 29.416016 35.677734 C 29.420464 36.145828 30.823937 38.02784 34.210938 42.119141 L 29.888672 37.054688 C 29.547379 36.654797 29.396775 36.162276 29.416016 35.677734 z M 110.47461 36.414062 C 110.39488 36.641236 110.27753 36.859943 110.11133 37.054688 L 106.75195 40.990234 C 108.88234 38.434823 110.29762 36.703272 110.47461 36.414062 z M 25 45 L 115 45 C 119.155 45 122.5 48.345 122.5 52.5 L 122.5 87.5 C 122.5 91.655 119.155 95 115 95 L 25 95 C 20.845 95 17.5 91.655 17.5 87.5 L 17.5 52.5 C 17.5 48.345 20.845 45 25 45 z M 31.175781 106.4375 C 30.293996 107.51103 29.733637 108.21312 29.677734 108.32812 C 29.423857 108.85037 29.401471 109.40758 29.613281 109.94531 C 29.717348 110.20952 30.599168 111.08712 31.707031 112.125 L 30.111328 110.76367 C 29.268543 110.04438 29.169383 108.7881 29.888672 107.94531 L 31.175781 106.4375 z M 110.08008 107.91016 L 110.11133 107.94531 C 110.22466 108.0781 110.31178 108.22345 110.38477 108.37305 C 110.3017 108.22969 110.20486 108.08045 110.08008 107.91016 z M 110.46875 109.9082 C 110.35523 110.22799 110.16651 110.52655 109.88867 110.76367 L 108.91406 111.5957 C 109.70516 110.84296 110.26814 110.24226 110.46875 109.9082 z M 97.589844 116.37891 C 98.508616 117.38803 99.077824 117.9543 99.419922 118.20898 C 99.152396 118.09105 98.904254 117.91959 98.701172 117.68164 L 97.589844 116.37891 z M 103.25977 116.42188 L 101.52148 117.90625 C 101.22073 118.16293 100.8671 118.31002 100.50391 118.36133 C 101.04659 118.08855 102.07668 117.3442 103.25977 116.42188 z M 38.306641 117.75977 C 38.640342 118.01172 38.941415 118.18864 39.222656 118.30273 C 38.957484 118.22604 38.702824 118.09769 38.478516 117.90625 L 38.306641 117.75977 z " /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="opacity:0.992325" /></svg>

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 141.7 141.7"
enable-background="new 0 0 141.7 141.7"
xml:space="preserve"
sodipodi:docname="cf_icon_MP_show_grey.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\Users\arnau\Documents\GitHub\inav-configurator\images\icons\cf_icon_MP_save2file.png"
inkscape:export-xdpi="74"
inkscape:export-ydpi="74"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17"><marker
style="overflow:visible"
id="marker1338"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1336" /></marker><marker
style="overflow:visible"
id="marker1292"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1290" /></marker><marker
style="overflow:visible"
id="marker1252"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1250" /></marker><marker
style="overflow:visible"
id="marker1218"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1216" /></marker><marker
style="overflow:visible"
id="marker1172"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1170" /></marker><marker
style="overflow:visible"
id="marker1150"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1148" /></marker><marker
style="overflow:visible"
id="marker1128"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path1126" /></marker><marker
style="overflow:visible"
id="Arrow1Lstart"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Lstart"
inkscape:isstock="true"><path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path856" /></marker><filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter3685"
x="-2.1675e-05"
width="1.0000434"
y="-2.1675e-05"
height="1.0000434"><feGaussianBlur
inkscape:collect="always"
stdDeviation="0.0011740625"
id="feGaussianBlur3687" /></filter></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1368"
inkscape:window-height="850"
id="namedview15"
showgrid="true"
inkscape:zoom="2.8743367"
inkscape:cx="77.947778"
inkscape:cy="74.480095"
inkscape:window-x="-6"
inkscape:window-y="-6"
inkscape:window-maximized="1"
inkscape:current-layer="layer2"
inkscape:snap-grids="true"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid1409" /></sodipodi:namedview>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:none;opacity:1;filter:url(#filter3685)" /><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:none;opacity:0.992325" /><g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3"
style="display:inline"><path
sodipodi:type="star"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path4372"
sodipodi:sides="3"
sodipodi:cx="70.849998"
sodipodi:cy="59.562496"
sodipodi:r1="60"
sodipodi:r2="30"
sodipodi:arg1="1.5707963"
sodipodi:arg2="2.6179939"
inkscape:flatsided="true"
inkscape:rounded="0.11"
inkscape:randomized="0"
d="m 70.85,119.5625 c -11.431535,0 -57.677294,-80.100002 -51.961527,-90.000002 5.715768,-9.900001 98.207277,-9.900003 103.923047,-3e-6 5.71577,9.9 -40.529985,90.000005 -51.96152,90.000005 z"
inkscape:transform-center-y="15" /></g></svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -190,5 +190,29 @@ let WaypointCollection = function () {
return tmpData;
}
self.addAttachedFromWaypoint = function (waypoint) {
let tmpNumber = 0;
let tmpData = self.getAttachedFromWaypoint(waypoint);
if (tmpData != 'undefined' && tmpData.length !=0) {
tmpNumber = tmpData.length;
}
console.log("tmpNumber : ",tmpNumber);
let tempWp = new Waypoint(waypoint.getNumber()+tmpNumber+1, MWNP.WPTYPE.JUMP, 0, 0);
tempWp.setAttached(true);
tempWp.setAttachedId(waypoint.getNumber());
self.insertWaypoint(tempWp, waypoint.getNumber()+tmpNumber+1);
self.update();
}
self.dropAttachedFromWaypoint = function (waypoint, waypointAttachedNumber) {
data.forEach(function (element) {
if (element.isAttached() && element.getAttachedId() == waypoint.getNumber() && element.getAttachedNumber() == waypointAttachedNumber) {
self.dropWaypoint(element);
self.update();
}
});
}
return self;
};

View file

@ -73,6 +73,14 @@
background-image: url(../images/icons/cf_icon_MP_add_grey.svg);
}
.tab-mission-control .ic_show {
background-image: url(../images/icons/cf_icon_MP_show_grey.svg);
}
.tab-mission-control .ic_hide {
background-image: url(../images/icons/cf_icon_MP_hide_grey.svg);
}
.tab-mission-control .btnicon {
background-repeat: no-repeat;
background-position: center;
@ -283,6 +291,23 @@
width: 100%;
}
.tab-mission-control .waypointOptionsTable input[type="select"] {
font-size: 12px;
width: 100%;
}
.tab-mission-control .waypointOptionsTable input[type="number"] {
font-size: 8px;
width: 100%;
-moz-appearance: textfield;
}
/* Chrome, Safari, Edge, Opera */
.tab-mission-control .waypointOptionsTable input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.tab-mission-control .waypointOptionsTable thead {
display: table-header-group !important;
}
@ -304,32 +329,97 @@
background-color: #ebe7e7;
}
.tab-mission-control .waypointOptionsTable .btnicon {
.tab-mission-control .btnMenu a {
/* common styles for content toolbar buttons */
/*margin-top: 0;*/
/*margin-bottom: 0;*/
/*margin-right: 20px;*/
background-color: #37a8db;
border-radius: 3px;
border: 1px solid #3394b5;
color: #fff;
/*float: right;*/
display: block;
cursor: pointer;
transition: all ease 0.2s;
padding: 0px;
margin: 5px;
float: right;
height: 14px;
line-height: 14px;
width: 14px;
}
.tab-mission-control .btnMenu a:hover {
background-color: #3394b5;
transition: all ease 0.2s;
}
.tab-mission-control .btnMenuIcon {
background-repeat: no-repeat;
background-position: center;
background-size: 14px;
}
.tab-mission-control .btnMenu-danger a {
background-color: #db250e;
border: 1px solid #b5480e;
}
.tab-mission-control .btnMenu-danger a:hover {
background-color: #b5480e;
}
.tab-mission-control .btnTable a {
/* common styles for content toolbar buttons */
/*margin-top: 0;*/
/*margin-bottom: 0;*/
/*margin-right: 20px;*/
background-color: #37a8db;
border-radius: 3px;
border: 1px solid #3394b5;
color: #fff;
/*float: right;*/
display: block;
cursor: pointer;
transition: all ease 0.2s;
padding: 0px;
margin: 5px;
float: right;
height: 11px;
line-height: 11px;
width: 11px;
}
.tab-mission-control .btnTable a:hover {
background-color: #3394b5;
transition: all ease 0.2s;
}
.tab-mission-control .btnTableIcon {
background-repeat: no-repeat;
background-position: center;
background-size: 11px;
}
.tab-mission-control .waypointOptionsTable_btn-danger a {
.tab-mission-control .btnTable-danger a {
background-color: #db250e;
height: 11px;
margin: 1px;
line-height: 11px;
width: 11px;
}
.tab-mission-control .waypointOptionsTable_btn-danger a:hover {
background-color: #b5480e;
transition: all ease 0.2s;
border: 1px solid #b5480e;
}
.tab-mission-control .waypointOptionsTable_btn-success a {
background-color: #28a745;
height: 11px;
margin: 1px;
line-height: 11px;
width: 11px;
}
.tab-mission-control .waypointOptionsTable_btn-success a:hover {
.tab-mission-control .btnTable-danger a:hover {
background-color: #b5480e;
transition: all ease 0.2s;
}
.tab-mission-control .btnTable-success a {
background-color: #28a745;
border: 1px solid #218838;
}
.tab-mission-control .btnTable-success a:hover {
background-color: #218838;
}

View file

@ -5,9 +5,60 @@
<div class="content_wrapper">
<div class="cf_column fourth" id="missionControls">
<div class="spacer_right">
<div id="missionPlanerAction" class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionActionMenuHead">Action Menu</div>
<div class="btnMenu btnMenuIcon show_btn" id="showHideActionButton">
<a class="ic_hide" href="#" title="Hide"></a>
</div>
</div>
<div class="spacer" id="ActionContent">
<div class="btn save_btn">
<a id="loadFileMissionButton" class="btnicon ic_loadFromFile" href="#" title="Load Mission File"></a>
<a id="saveFileMissionButton" class="btnicon ic_save2File" href="#" title="Save Mission File"></a>
</div>
<div class="btn save_btn">
<a id="loadMissionButton" class="btnicon ic_loadFromFC" href="#" title="Load mission from FC"</a>
<a id="saveMissionButton" class="btnicon ic_save2FC" href="#" title="Save mission to FC"</a>
<a id="loadEepromMissionButton" class="btnicon ic_loadFromEprom" href="#" title="Load Eeprom mission"></a>
<a id="saveEepromMissionButton" class="btnicon ic_save2Eprom" href="#" title="Save Eeprom mission"></a>
</div>
<hr>
<div id="removeAllPoints" class="btn btn-danger_long" style="padding-top: 1px; display: inline-block">
<a class="btnicon ic_removeAll" href="#" title="Remove all"></a>
</div>
</div>
</div>
<div id="missionPlanerTotalInfo" class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionTotalInformationHead">Total information</div>
<div class="btnMenu btnMenuIcon show_btn" id="showHideInfoButton">
<a class="ic_hide" href="#" title="Hide"></a>
</div>
</div>
<div class="spacer" id="InfoContent">
<div id="infoMissionDistance" style="padding-bottom: 2px;">
<span>Distance (m):</span>
<span id="missionDistance"></span>
</div>
<div id="infoAvailablePoints" style="padding-bottom: 2px;">
<span>Available Points</span>
<span id="availablePoints">0/0</span>
</div>
<div id="infoMissionValid" style="padding-bottom: 2px;">
<span>Mission valid</span>
<div id="missionValid" style="display: inline-block"></div>
</div>
</div>
</div>
<div id="missionPlanerSettings" class="gui_box grey" style="display: none">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionDefaultSettingsHead">Default settings</div>
<div class="btnMenu btnMenuIcon save_btn">
<a id="cancelSettings" class="ic_cancel" href="#" title="Cancel"></a>
<a id="saveSettings" class="ic_save" href="#" title="Save"></a>
</div>
</div>
<div class="spacer">
<div class="point">
@ -18,12 +69,6 @@
<label class="point-label" for="MPdefaultPointSpeed">Speed (cm/s): </label>
<input id="MPdefaultPointSpeed" type="text" value="0" required>
</div>
<div>
<div class="btn save_btn" style="padding-top: 10px;">
<a id="saveSettings" class="btnicon ic_save" href="#" title="Save" style="float: left"></a>
<a id="cancelSettings" class="btnicon ic_cancel" href="#" style="float: left" title="Cancel"></a>
</div>
</div>
</div>
</div>
<div id="missionPlanerSafehome" class="gui_box grey" style="display: none">
@ -54,44 +99,13 @@
</div>
</div>
</div>
<div id="missionPlanerTotalInfo" class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionTotalInformationHead">Total information</div>
</div>
<div class="spacer">
<div id="infoMissionDistance" style="padding-bottom: 2px;">
<span>Distance (m):</span>
<span id="missionDistance"></span>
</div>
<div id="infoAvailablePoints" style="padding-bottom: 2px;">
<span>Available Points</span>
<span id="availablePoints">0/0</span>
</div>
<div id="infoMissionValid" style="padding-bottom: 2px;">
<span>Mission valid</span>
<div id="missionValid" style="display: inline-block"></div>
</div>
<br>
<hr>
<div class="btn save_btn">
<a id="loadFileMissionButton" class="btnicon ic_loadFromFile" href="#" title="Load Mission File"></a>
<a id="saveFileMissionButton" class="btnicon ic_save2File" href="#" title="Save Mission File"></a>
</div>
<div class="btn save_btn">
<a id="loadMissionButton" class="btnicon ic_loadFromFC" href="#" title="Load mission from FC"</a>
<a id="saveMissionButton" class="btnicon ic_save2FC" href="#" title="Save mission to FC"</a>
<a id="loadEepromMissionButton" class="btnicon ic_loadFromEprom" href="#" title="Load Eeprom mission"></a>
<a id="saveEepromMissionButton" class="btnicon ic_save2Eprom" href="#" title="Save Eeprom mission"></a>
</div>
<hr>
<div id="removeAllPoints" class="btn btn-danger_long" style="padding-top: 1px; display: inline-block">
<a class="btnicon ic_removeAll" href="#" title="Remove all"></a>
</div>
</div>
</div>
<div class="gui_box grey" id="MPeditPoint" style="display: none">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="editPointHead">Edit point</div>
<div id="removePoint" class="btnMenu btnMenuIcon btnMenu-danger">
<a class="ic_removeAll" href="#" title="Remove"></a>
</div>
</div>
<div class="spacer">
<input type="hidden" name="pointNumber" value="">
@ -121,7 +135,7 @@
<label class="point-label" for="pointAlt">Alt (cm): </label>
<input id="pointAlt" type="text" value="0" required><span id="altitudeInMeters"></span>
</div>
<!-- <div class="point" id="pointP1class" style="display: none">
<div class="point" id="pointP1class" style="display: none">
<label class="point-label" for="pointP1">Parameter 1: </label>
<input id="pointP1" type="text" value="0" required>
</div>
@ -132,14 +146,14 @@
<div class="point" id="pointP3class" style="display: none">
<label class="point-label" for="pointP3">Parameter 3: </label>
<input id="pointP3" type="text" value="0" required>
</div> -->
</div>
<div>
<table class="waypointOptionsTable">
<thead>
<tr>
<th style="width: 30px">
<div id="addOptionsPoint" class="btn waypointOptionsTable_btn-success">
<a class="btnicon ic_add" href="#" style="float: center" title="Add"></a>
<div id="addOptionsPoint" class="btnTable btnTableIcon btnTable-success">
<a class="ic_add" data-role="waypointOptions-add" href="#" style="float: center" title="Add"></a>
</div>
</th>
<th style="width: 50px" data-i18n="WaypointOptionId"></th>
@ -180,14 +194,6 @@
</div>
</div> -->
<div style="padding-top: 10px; display: block">
<div id="savePoint" class="btn save_btn">
<a class="btnicon ic_save" href="#" style="float: left" title="Save"></a>
</div>
<div id="removePoint" class="btn btn-danger_short">
<a class="btnicon ic_removeAll" href="#" style="float: left" title="Remove"></a>
</div>
</div>
</div>
</div>
</div>

View file

@ -418,8 +418,8 @@ TABS.mission_control.initialize = function (callback) {
<td></td> \
<td><span class="safehome-number"/></td>\
<td class="safehome-enabled"><input type="checkbox" class="togglesmall safehome-enabled-value"/></td> \
<td><input type="text" class="safehome-lon" /></td>\
<td><input type="text" class="safehome-lat" /></td>\
<td><input type="number" class="safehome-lon" /></td>\
<td><input type="number" class="safehome-lat" /></td>\
</tr>\
');
@ -673,7 +673,7 @@ TABS.mission_control.initialize = function (callback) {
updateTotalInfo();
}
function addWaypointMarker(waypoint) {
function addWaypointMarker(waypoint, isEdit=false) {
let coord = ol.proj.fromLonLat([waypoint.getLon(), waypoint.getLat()]);
var iconFeature = new ol.Feature({
@ -682,7 +682,7 @@ TABS.mission_control.initialize = function (callback) {
population: 4000,
rainfall: 500
});
iconFeature.setStyle(getWaypointIcon(waypoint, false));
iconFeature.setStyle(getWaypointIcon(waypoint, isEdit));
var vectorSource = new ol.source.Vector({
features: [iconFeature]
});
@ -749,7 +749,7 @@ TABS.mission_control.initialize = function (callback) {
$('#missionDistance').text(0);
cleanLines();
mission.get().forEach(function (element) {
console.log(element.getNumber());
//console.log(element.getNumber());
if (!element.isAttached()) {
/* console.log("Not Attached");
console.log("element.getAction() : ",MWNP.WPTYPE.REV[element.getAction()]);
@ -884,6 +884,13 @@ TABS.mission_control.initialize = function (callback) {
repaintLine4Waypoints(mission);
}
function redrawLayer() {
if (selectedFeature && selectedMarker) {
selectedFeature.setStyle(getWaypointIcon(selectedMarker, true));
}
repaintLine4Waypoints(mission);
}
function renderWaypointOptionsTable(waypoint) {
/*
@ -893,35 +900,76 @@ TABS.mission_control.initialize = function (callback) {
mission.getAttachedFromWaypoint(waypoint).forEach(function (element) {
$waypointOptionsTableBody.append('\
<tr>\
<td><div id="deleteOptionsPoint" class="btn waypointOptionsTable_btn-danger"> \
<a class="btnicon ic_cancel" href="#" style="float: center" title="Delete"></a> \
<td><div id="deleteOptionsPoint" class="btnTable btnTableIcon btnTable-danger"> \
<a class="ic_cancel" data-role="waypointOptions-delete" href="#" style="float: center" title="Delete"></a> \
</div>\
</td> \
<td><span class="waypointOptions-number"/></td>\
<td><select class="waypointOptions-action"></select></td> \
<td><input type="text" class="waypointOptions-p1"/></td>\
<td><input type="text" class="waypointOptions-p2" /></td>\
<td><input type="number" class="waypointOptions-p1"/></td>\
<td><input type="number" class="waypointOptions-p2" /></td>\
</tr>\
');
const $row = $waypointOptionsTableBody.find('tr:last');
console.log(MWNP.WPTYPE.REV[element.getAction()]);
console.log(typeof MWNP.WPTYPE.REV[element.getAction()]);
for (var i = 1; i <= 3; i++) {
if (dictOfLabelParameterPoint[element.getAction()]['parameter'+String(i)] != '') {
$row.find(".waypointOptions-p"+String(i)).prop("disabled", false);
}
else {
$row.find(".waypointOptions-p"+String(i)).prop("disabled", true);
}
}
/* console.log(MWNP.WPTYPE.REV[element.getAction()]);
console.log(typeof MWNP.WPTYPE.REV[element.getAction()]); */
GUI.fillSelect($row.find(".waypointOptions-action"), waypointOptions, waypointOptions.indexOf(MWNP.WPTYPE.REV[element.getAction()]));
$row.find(".waypointOptions-action").val(waypointOptions.indexOf(MWNP.WPTYPE.REV[element.getAction()])).change(function () {
element.setAction(MWNP.WPTYPE[waypointOptions[$(this).val()]]);
for (var i = 1; i <= 3; i++) {
if (dictOfLabelParameterPoint[element.getAction()]['parameter'+String(i)] != '') {
$row.find(".waypointOptions-p"+String(i)).prop("disabled", false);
}
else {
$row.find(".waypointOptions-p"+String(i)).prop("disabled", true);
}
}
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
});
$row.find(".waypointOptions-number").text(element.getAttachedNumber()+1);
$row.find(".waypointOptions-p1").val(element.getP1()).change(function () {
element.setP1($(this).val());
if (MWNP.WPTYPE.REV[element.getAction()] == "SET_HEAD") {
if ($(this).val() >= 360 || ($(this).val() < 0 && $(this).val() != -1))
{
$(this).val(-1);
alert(chrome.i18n.getMessage('MissionPlannerHeadSettingsCheck'));
}
}
else if (MWNP.WPTYPE.REV[element.getAction()] == "RTH") {
if ($(this).val() != 0 && $(this).val() != 1)
{
$(this).val(0);
alert(chrome.i18n.getMessage('MissionPlannerRTHSettingsCheck'));
}
}
element.setP1(Number($(this).val()));
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
});
$row.find(".waypointOptions-p2").val(element.getP2()).change(function () {
element.setP2($(this).val());
element.setP2(Number($(this).val()));
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
});
$row.find("[data-role='waypointOptions-delete']").attr("data-index", element.getAttachedNumber()+1);
@ -1250,14 +1298,20 @@ TABS.mission_control.initialize = function (callback) {
$('#pointP1').val(selectedMarker.getP1());
$('#pointP2').val(selectedMarker.getP2());
$('#pointP3').val(selectedMarker.getP3());
// Selection box update depending on choice of type of waypoint
for (var j in dictOfLabelParameterPoint[selectedMarker.getAction()]) {
if (dictOfLabelParameterPoint[selectedMarker.getAction()][j] != '') {
$('#pointP'+String(j).slice(-1)+'class').fadeIn(300);
$('label[for=pointP'+String(j).slice(-1)+']').html(dictOfLabelParameterPoint[selectedMarker.getAction()][j]);
}
else {$('#pointP'+String(j).slice(-1)+'class').fadeOut(300);}
}
selectedMarker = renderWaypointOptionsTable(selectedMarker);
$('#MPeditPoint').fadeIn(300);
}
else if (selectedFeature && tempMarker.kind == "line" && tempMarker.selection) {
let tempWpCoord = ol.proj.toLonLat(evt.coordinate);
let tempWp = new Waypoint(tempMarker.number, MWNP.WPTYPE.WAYPOINT, tempWpCoord[1], tempWpCoord[0], alt=settings.alt, p1=settings.speed);
//console.log("tempMarker.number : ",tempMarker.number);
//console.log("mission : ",mission.getWaypoint(tempMarker.number), mission.getWaypoint(tempMarker.number));
mission.insertWaypoint(tempWp, tempMarker.number);
mission.update();
cleanLayers();
@ -1376,6 +1430,156 @@ TABS.mission_control.initialize = function (callback) {
$('#altitudeInMeters').text(` ${altitudeMeters}m`);
});
/////////////////////////////////////////////
// Callback to show/hide menu boxes
/////////////////////////////////////////////
$('#showHideActionButton').on('click', function () {
var src = ($(this).children().attr('class') === 'ic_hide')
? 'ic_show'
: 'ic_hide';
$(this).children().attr('class', src);
if ($(this).children().attr('class') === 'ic_hide') {
$('#ActionContent').fadeIn(300);
}
else {
$('#ActionContent').fadeOut(300);
}
});
$('#showHideInfoButton').on('click', function () {
var src = ($(this).children().attr('class') === 'ic_hide')
? 'ic_show'
: 'ic_hide';
$(this).children().attr('class', src);
if ($(this).children().attr('class') === 'ic_hide') {
$('#InfoContent').fadeIn(300);
}
else {
$('#InfoContent').fadeOut(300);
}
});
/////////////////////////////////////////////
// Callback for Waypoint edition
/////////////////////////////////////////////
$('#pointType').change(function () {
if (selectedMarker) {
selectedMarker.setAction($('#pointType').val());
if ([MWNP.WPTYPE.SET_POI,MWNP.WPTYPE.PH_UNLIM,MWNP.WPTYPE.LAND].includes(selectedMarker.getAction())) {
selectedMarker.setP1(0);
selectedMarker.setP2(0);
selectedMarker.setP3(0);
}
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointLat').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setLat($('#pointLat').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointLon').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setLon($('#pointLon').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointAlt').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setAlt($('#pointAlt').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointP1').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setP1($('#pointP1').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointP2').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setP2($('#pointP2').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
$('#pointP3').on('keypress', function (event) {
if (selectedMarker && event.which == 13) {
selectedMarker.setP3($('#pointP3').val());
mission.updateWaypoint(selectedMarker);
mission.update();
redrawLayer();
//cleanLayers();
//redrawLayers();
}
});
/////////////////////////////////////////////
// Callback for Waypoint Options Table
/////////////////////////////////////////////
$waypointOptionsTableBody.on('click', "[data-role='waypointOptions-delete']", function (event) {
//console.log($(event.currentTarget).attr("data-index"));
if (selectedMarker) {
mission.dropAttachedFromWaypoint(selectedMarker, $(event.currentTarget).attr("data-index")-1);
renderWaypointOptionsTable(selectedMarker);
cleanLayers();
redrawLayers();
}
});
$("[data-role='waypointOptions-add']").click(function () {
if (selectedMarker) {
/* let tmpListWP = mission.getAttachedFromWaypoint(selectedMarker);
console.log("1 ", mission.getAttachedFromWaypoint(selectedMarker));
if (tmpListWP.length !=0) {
console.log("1.1 ", tmpListWP[tmpListWP.length-1].getAttachedNumber());
}
else {
console.log("tmpListWP empty");
} */
mission.addAttachedFromWaypoint(selectedMarker);
//console.log("2 ", mission.getAttachedFromWaypoint(selectedMarker));
renderWaypointOptionsTable(selectedMarker);
cleanLayers();
redrawLayers();
}
});
/////////////////////////////////////////////
// Callback for Remove buttons
/////////////////////////////////////////////
$('#removeAllPoints').on('click', function () {
if (markers.length && confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) {
removeAllWaypoints();
@ -1393,6 +1597,7 @@ TABS.mission_control.initialize = function (callback) {
}
});
// SavePoint function updated to take into account P1 to P3 parameter and JUMP,RTH, SET_HEAD options for WP
$('#savePoint').on('click', function () {
if (selectedMarker) {