1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-26 09:45:23 +03:00

Waypoint OOP version 1.3

This commit is contained in:
ArnoTlse 2021-04-05 20:03:34 +02:00
parent 739caeb49b
commit 84de6011c9
10 changed files with 910 additions and 211 deletions

View file

@ -3596,7 +3596,10 @@
"message": "Current Meter Type"
},
"MissionPlannerJumpSettingsCheck": {
"message": "JUMP settings incorrect : Check it again!"
"message": "JUMP settings incorrect : Check it again! Being forced to WP 1!"
},
"MissionPlannerJump2SettingsCheck": {
"message": "JUMP settings incorrect : Repeat should not exceed 10! Check it again! Being forced to number of repeat equal 0!"
},
"MissionPlannerHeadSettingsCheck": {
"message": "Heading value is incorrect : Check it again! Being forced by default to -1 thence!"

View file

@ -0,0 +1,224 @@
<?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_center_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="layer4"
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:none;opacity:0.989808"><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.137497"
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="1.5887208e-06"
transform="rotate(-90,70.849997,-70.849998)"
inkscape:transform-center-x="-15.000001" /></g><g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Layer 4"
style="display:inline"><path
id="path932"
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:6.07261;stroke-linecap:round;stroke-linejoin:round"
d="M 70.527344 13.40625 A 58.195812 58.195812 0 0 0 12.654297 71.601562 A 58.195812 58.195812 0 0 0 70.849609 129.79688 A 58.195812 58.195812 0 0 0 129.04492 71.601562 A 58.195812 58.195812 0 0 0 70.849609 13.40625 A 58.195812 58.195812 0 0 0 70.527344 13.40625 z M 70.763672 24.539062 A 47.062809 47.062809 0 0 1 70.849609 24.539062 A 47.062809 47.062809 0 0 1 117.91211 71.601562 A 47.062809 47.062809 0 0 1 70.849609 118.66406 A 47.062809 47.062809 0 0 1 23.787109 71.601562 A 47.062809 47.062809 0 0 1 70.763672 24.539062 z " /><circle
style="display:inline;opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:1.82512;stroke-linecap:round;stroke-linejoin:round"
id="path932-8"
cx="70.849998"
cy="71.601479"
r="17.490768" /><rect
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.99811;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect964"
width="15"
height="40"
x="63.349998"
y="0.7514801"
ry="7.5" /><rect
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.99811;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect996"
width="15"
height="40"
x="63.349995"
y="-140.94852"
ry="7.5"
transform="rotate(90)"
inkscape:transform-center-x="-50.098519" /><rect
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.99811;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect1007"
width="15"
height="40"
x="-78.349998"
y="-140.94852"
ry="7.5"
transform="scale(-1)"
inkscape:transform-center-y="50.098523" /><rect
style="opacity:0.994175;fill:#f3f3f3;fill-opacity:1;stroke-width:5.99811;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect1009"
width="15"
height="40"
x="-78.349998"
y="0.75147653"
ry="7.5"
transform="rotate(-90)"
inkscape:transform-center-y="3.5494586e-06"
inkscape:transform-center-x="50.098523" /></g></svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

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_play_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.137497"
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="1.5887208e-06"
transform="rotate(-90,70.849997,-70.849998)"
inkscape:transform-center-x="-15.000001" /></g></svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -0,0 +1,188 @@
<?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_stop_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="layer4"
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:none;opacity:0.989808"><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.137497"
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="1.5887208e-06"
transform="rotate(-90,70.849997,-70.849998)"
inkscape:transform-center-x="-15.000001" /></g><g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Layer 4"
style="display:inline"><rect
style="display:inline;opacity:0.994175;fill:#f3f3f3;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1"
id="rect908-5"
width="100"
height="105"
x="20.849998"
y="18.349998"
ry="15.666213" /></g></svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

@ -20,6 +20,18 @@
inkscape:export-ydpi="74.705879">
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient2690">
<stop
style="stop-color:#808080;stop-opacity:1;"
offset="0"
id="stop1479" />
<stop
style="stop-color:#808080;stop-opacity:0;"
offset="1"
id="stop1481" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2935">
@ -70,7 +82,7 @@
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2690">
id="linearGradient2690-0">
<stop
style="stop-color:#808080;stop-opacity:1;"
offset="0"
@ -103,7 +115,7 @@
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2690"
xlink:href="#linearGradient2690-0"
id="linearGradient2692"
x1="-2.589256"
y1="71.091553"
@ -113,7 +125,7 @@
gradientTransform="matrix(0.74326319,0,0,2.2731316,7.1421168,-68.397657)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2690"
xlink:href="#linearGradient2690-0"
id="linearGradient2692-8"
x1="-2.589256"
y1="71.091553"
@ -157,6 +169,15 @@
x2="33.759918"
y2="53.721268"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2690"
id="linearGradient1472"
gradientUnits="userSpaceOnUse"
x1="33.759918"
y1="20.197287"
x2="33.759918"
y2="53.721268" />
</defs>
<sodipodi:namedview
id="base"
@ -169,7 +190,7 @@
inkscape:cx="64.251969"
inkscape:cy="64.251969"
inkscape:document-units="mm"
inkscape:current-layer="svg8"
inkscape:current-layer="g1466"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1368"
@ -303,7 +324,7 @@
inkscape:label="fond uni vert"
inkscape:groupmode="layer"
id="g2906"
style="display:inline;opacity:1;mix-blend-mode:normal"
style="display:none;opacity:1;mix-blend-mode:normal"
transform="translate(-18.709808,-20.180163)">
<path
id="path2904"
@ -316,7 +337,7 @@
inkscape:label="degradé vert"
inkscape:groupmode="layer"
id="g2910"
style="display:inline;opacity:1;mix-blend-mode:normal"
style="display:none;opacity:1;mix-blend-mode:normal"
transform="translate(-18.709808,-20.180163)">
<path
id="path2908"
@ -325,6 +346,32 @@
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</g>
<g
inkscape:label="fond uni gris"
inkscape:groupmode="layer"
id="g1470"
style="display:inline;opacity:1;mix-blend-mode:normal"
transform="translate(-18.709808,-20.180163)">
<path
id="path1468"
style="fill:#c8c8c8;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
d="m 33.759918,20.312455 c -2.337999,0 -5.082476,0.475277 -8.084778,3.140377 -4.086081,3.627155 -3.911291,8.043803 -3.741891,10.624157 0.156873,2.389534 1.246556,4.650933 2.271696,6.815087 1.375534,2.903871 4.383434,7.604098 6.420798,10.08879 2.163382,2.638385 3.134175,2.740403 3.134175,2.740403 0,0 0.970793,-0.102018 3.134175,-2.740403 2.037363,-2.484692 5.045262,-7.184919 6.420797,-10.08879 1.025138,-2.164154 2.114822,-4.425553 2.271696,-6.815087 0.1694,-2.580354 0.344192,-6.997002 -3.741891,-10.624157 -3.002301,-2.6651 -5.746781,-3.140377 -8.084777,-3.140377 z"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</g>
<g
inkscape:label="degradé gris"
inkscape:groupmode="layer"
id="g1466"
style="display:inline;opacity:1;mix-blend-mode:normal"
transform="translate(-18.709808,-20.180163)">
<path
id="path1464"
style="fill:url(#linearGradient1472);fill-opacity:1.0;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
d="m 33.759918,20.312455 c -2.337999,0 -5.082476,0.475277 -8.084778,3.140377 -4.086081,3.627155 -3.911291,8.043803 -3.741891,10.624157 0.156873,2.389534 1.246556,4.650933 2.271696,6.815087 1.375534,2.903871 4.383434,7.604098 6.420798,10.08879 2.163382,2.638385 3.134175,2.740403 3.134175,2.740403 0,0 0.970793,-0.102018 3.134175,-2.740403 2.037363,-2.484692 5.045262,-7.184919 6.420797,-10.08879 1.025138,-2.164154 2.114822,-4.425553 2.271696,-6.815087 0.1694,-2.580354 0.344192,-6.997002 -3.741891,-10.624157 -3.002301,-2.6651 -5.746781,-3.140377 -8.084777,-3.140377 z"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
</g>
<g
inkscape:groupmode="layer"
id="g2896"
@ -397,7 +444,8 @@
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="safehome">
inkscape:label="safehome"
style="display:inline">
<g
id="g1558"
transform="matrix(0.10566239,0,0,0.10566239,9.2966254,1.7550126)"

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before After
Before After

View file

@ -32,7 +32,7 @@ let SafehomeCollection = function () {
self.inflate = function () {
while (self.hasFreeSlots()) {
self.put(new Safehome(0, 0, 0, 0));
self.put(new Safehome(data.length, 0, 0, 0));
}
};
@ -81,5 +81,20 @@ let SafehomeCollection = function () {
});
}
self.getSafehome = function(safehomeId) {
for (let safehomeIndex in data) {
if (data.hasOwnProperty(safehomeIndex)) {
let safehome = data[safehomeIndex];
if (safehome.getNumber() == safehomeId ) {
return safehome;
}
}
}
};
self.updateSafehome = function(newSafehome) {
data[newSafehome.getNumber()] = newSafehome;
};
return self;
};

View file

@ -81,6 +81,18 @@
background-image: url(../images/icons/cf_icon_MP_hide_grey.svg);
}
.tab-mission-control .ic_play {
background-image: url(../images/icons/cf_icon_MP_play_grey.svg);
}
.tab-mission-control .ic_stop {
background-image: url(../images/icons/cf_icon_MP_stop_grey.svg);
}
.tab-mission-control .ic_center {
background-image: url(../images/icons/cf_icon_MP_center_grey.svg);
}
.tab-mission-control .btnicon {
background-repeat: no-repeat;
background-position: center;
@ -126,6 +138,33 @@
transition: all ease 0.2s;
}
.tab-mission-control .btn-danger a {
background-color: #db250e;
border: 1px solid #b5480e;
height: 28px;
margin:5px;
line-height: 28px;
width: 28px;
}
.tab-mission-control .btn-danger a:hover {
background-color: #b5480e;
transition: all ease 0.2s;
}
.tab-mission-control .btn-success a {
background-color: #28a745;
border: 1px solid #218838;
height: 28px;
margin:5px;
line-height: 28px;
width: 28px;
}
.tab-mission-control .btn-success a:hover {
background-color: #218838;
transition: all ease 0.2s;
}
.tab-mission-control .checksfail {
/*float: right;*/
margin-top: 3px;
@ -259,6 +298,18 @@
width: 100%;
}
.tab-mission-control .safehomesTable input[type="number"] {
font-size: 8px;
width: 100%;
-moz-appearance: textfield;
}
/* Chrome, Safari, Edge, Opera */
.tab-mission-control .safehomesTable input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.tab-mission-control .safehomesTable thead {
display: table-header-group !important;
}
@ -386,8 +437,8 @@
cursor: pointer;
transition: all ease 0.2s;
padding: 0px;
margin: 5px;
float: right;
margin: 2px;
float: left;
height: 11px;
line-height: 11px;
width: 11px;

View file

@ -25,7 +25,14 @@
<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">
<div class="btn">
<a id="playMissionButton" class="btnicon ic_play" href="#" title="Play mission"></a>
<div class="btn-danger">
<a id="stopMissionButton" class="btnicon ic_stop" href="#" title="Stop mission"></a>
</div>
</div>
<hr>
<div id="removeAllPoints" class="btn btn-danger" style="padding-top: 1px; display: inline-block">
<a class="btnicon ic_removeAll" href="#" title="Remove all"></a>
</div>
</div>
@ -74,29 +81,29 @@
<div id="missionPlanerSafehome" class="gui_box grey" style="display: none">
<div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionSafehomeHead">Safe Home manager</div>
<div class="btnMenu btnMenuIcon save_btn">
<div id="showHideSafehomeButton">
<a class="ic_hide" href="#" title="Hide"></a>
</div>
<div class="spacer">
<a id="cancelSafehome" class="ic_cancel" href="#" title="Cancel"></a>
</div>
</div>
<div class="spacer" id="SafehomeContent">
<div>
<table class="safehomesTable">
<thead>
<tr>
<th style="width: 50px" data-i18n="SafehomeSelected"></th>
<th style="width: 80px" data-i18n="SafehomeSelected"></th>
<th style="width: 50px" data-i18n="SafehomeId"></th>
<th style="width: 80px" data-i18n="SafehomeEnabled"></th>
<th style="width: 120px" data-i18n="SafehomeLon"></th>
<th style="width: 120px" data-i18n="SafehomeLat"></th>
</tr>
</thead>
<tbody>
<tbody id="safehomesTableBody">
</tbody>
</table>
</div>
<div>
<div class="btn save_btn" style="padding-top: 10px;">
<a id="saveSafehome" class="btnicon ic_save" href="#" title="Save" style="float: left"></a>
<a id="cancelSafehome" class="btnicon ic_cancel" href="#" style="float: left" title="Cancel"></a>
</div>
</div>
</div>
</div>

View file

@ -42,6 +42,7 @@ var dictOfLabelParameterPoint = {
var waypointOptions = ['JUMP','SET_HEAD','RTH'];
TABS.mission_control = {};
TABS.mission_control.isYmapLoad = false;
TABS.mission_control.initialize = function (callback) {
@ -99,7 +100,7 @@ TABS.mission_control.initialize = function (callback) {
}
$safehomesTable = $('.safehomesTable');
$safehomesTableBody = $safehomesTable.find('tbody');
$safehomesTableBody = $('#safehomesTableBody');
$waypointOptionsTable = $('.waypointOptionsTable');
$waypointOptionsTableBody = $('#waypointOptionsTableBody');
@ -327,6 +328,8 @@ TABS.mission_control.initialize = function (callback) {
var markers = [];
var lines = [];
var safehomeMarkers =[];
var map;
var selectedMarker = null;
var selectedFeature = null;
@ -341,6 +344,11 @@ TABS.mission_control.initialize = function (callback) {
var safehomeFromBuffer = [];
var mission = new WaypointCollection();
var SAFEHOMES = new SafehomeCollection(); // TO DELETE FOR SAFEHOMES RELEASE
SAFEHOMES.inflate(); // TO DELETE FOR SAFEHOMES RELEASE
var safehomeRangeRadius = 200; //meters
var safehomeSafeRadius = 50; //meters
/////////////////////////////////////////////
// Reinit Form
/////////////////////////////////////////////
@ -385,10 +393,6 @@ TABS.mission_control.initialize = function (callback) {
function closeSettingsPanel() {
$('#missionPlanerSettings').hide();
$('#missionPlanerTotalInfo').fadeIn(300);
if (selectedMarker !== null) {
$('#MPeditPoint').fadeIn(300);
}
}
/////////////////////////////////////////////
@ -396,10 +400,7 @@ TABS.mission_control.initialize = function (callback) {
/////////////////////////////////////////////
function closeSafehomePanel() {
$('#missionPlanerSafehome').hide();
$('#missionPlanerTotalInfo').fadeIn(300);
if (selectedMarker !== null) {
$('#MPeditPoint').fadeIn(300);
}
cleanSafehomeLayers();
}
function renderSafehomesTable() {
@ -415,7 +416,11 @@ TABS.mission_control.initialize = function (callback) {
$safehomesTableBody.append('\
<tr>\
<td></td> \
<td><div id="viewSafomePoint" class="btnTable btnTableIcon"> \
<a class="ic_cancel" data-role="safehome-view" href="#" title="View"></a> \
<a class="ic_center" data-role="safehome-center" href="#" title="move to center view"></a> \
</div>\
</td> \
<td><span class="safehome-number"/></td>\
<td class="safehome-enabled"><input type="checkbox" class="togglesmall safehome-enabled-value"/></td> \
<td><input type="number" class="safehome-lon" /></td>\
@ -432,18 +437,28 @@ TABS.mission_control.initialize = function (callback) {
$row.find(".safehome-number").text(safehome.getNumber()+1);
$row.find(".safehome-enabled-value").prop('checked',safehome.isUsed()).change(function () {
safehome.setEnabled($(this).val());
safehome.setEnabled((($(this).prop('checked')) ? true : false));
SAFEHOMES.updateSafehome(safehome);
cleanSafehomeLayers();
renderSafehomesOnMap();
});
$row.find(".safehome-lon").val(safehome.getLon()).change(function () {
safehome.setLon($(this).val());
safehome.setLon(Number($(this).val()));
SAFEHOMES.updateSafehome(safehome);
cleanSafehomeLayers();
renderSafehomesOnMap();
});
$row.find(".safehome-lat").val(safehome.getLat()).change(function () {
safehome.setLat($(this).val());
safehome.setLat(Number($(this).val()));
SAFEHOMES.updateSafehome(safehome);
cleanSafehomeLayers();
renderSafehomesOnMap();
});
$row.find("[data-role='role-servo-delete']").attr("data-index", safehomeIndex);
$row.find("[data-role='safehome-view']").attr("data-index", safehomeIndex);
$row.find("[data-role='safehome-center']").attr("data-index", safehomeIndex);
}
}
GUI.switchery();
@ -451,15 +466,22 @@ TABS.mission_control.initialize = function (callback) {
}
function renderSafehomesOnMap(safehomes) {
function renderSafehomesOnMap() {
/*
* Process safehome on Map
*/
safehomes.get().forEach(function (safehome) {
SAFEHOMES.get().forEach(function (safehome) {
map.addLayer(addSafeHomeMarker(safehome));
});
}
function cleanSafehomeLayers() {
for (var i in safehomeMarkers) {
map.removeLayer(safehomeMarkers[i]);
}
safehomeMarkers = [];
}
function getSafehomeIcon(safehome) {
/*
* Process Safehome Icon
@ -499,168 +521,67 @@ TABS.mission_control.initialize = function (callback) {
rainfall: 500
});
iconFeature.setStyle(getSafehomeIcon(safehome));
iconFeature.setStyle(getSafehomeIcon(safehome, safehome.isUsed()));
var circleFeature = new ol.Feature({
geometry: new ol.geom.Circle(coord, safehomeRangeRadius),
name: 'Null Island',
population: 4000,
rainfall: 500
});
circleFeature.setStyle(new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(255, 163, 46, 1)',
width: 3,
lineDash : [10]
}),
// fill: new ol.style.Fill({
// color: 'rgba(251, 225, 155, 0.1)'
// })
}));
var circleSafeFeature = new ol.Feature({
geometry: new ol.geom.Circle(coord, safehomeSafeRadius),
name: 'Null Island',
population: 4000,
rainfall: 500
});
circleSafeFeature.setStyle(new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'rgba(136, 204, 62, 1)',
width: 3,
lineDash : [10]
}),
/* fill: new ol.style.Fill({
color: 'rgba(136, 204, 62, 0.1)'
}) */
}));
if (safehome.isUsed()) {
var vectorSource = new ol.source.Vector({
features: [iconFeature, circleFeature, circleSafeFeature]
});
}
else {
var vectorSource = new ol.source.Vector({
features: [iconFeature]
});
}
var vectorLayer = new ol.layer.Vector({
source: vectorSource
});
vectorLayer.kind = "safehome";
vectorLayer.number = safehome.getNumber();
safehomeMarkers.push(vectorLayer);
return vectorLayer;
}
/////////////////////////////////////////////
// Manage Plotting functions
/////////////////////////////////////////////
// Function to repaint lines between markers
/* function repaint() {
var oldPos;
var oldAction;
var poiNumber;
var poiList;
var lengthPoiList;
var activatePoi = false;
var activateHead = false;
var oldHeading;
var xmlItemNumber = 0;
for (var i in lines) {
map.removeLayer(lines[i]);
}
lines = [];
poiList = [];
$('#missionDistance').text(0);
map.getLayers().forEach(function (t) {
if (t instanceof ol.layer.Vector && typeof t.alt !== 'undefined' && t.kind == "marker") {
var geometry = t.getSource().getFeatures()[0].getGeometry();
var action = t.action;
var markerNumber = t.number;
var options = t.options;
if (action == 5) {
// If action is Set_POI, increment counter of POI
poiNumber = markerNumber;
lengthPoiList = poiList.push(poiNumber);
activatePoi = true;
}
else {
// If classic WPs, draw standard line in-between
if (typeof oldPos !== 'undefined' && activatePoi != true && activateHead != true){
paintLine(oldPos, geometry.getCoordinates());
}
// If one is POI, draw orange line in-between and modulate dashline each time a new POI is defined
else if (typeof oldPos !== 'undefined' && activatePoi == true && activateHead != true) {
if ((lengthPoiList % 2) == 0) {
paintLine(oldPos, geometry.getCoordinates(), '#ffb725', 5);
}
else {
paintLine(oldPos, geometry.getCoordinates(), '#ffb725');
}
}
// If one is SET_HEAD, draw labelled line in-between with heading value
else if (typeof oldPos !== 'undefined' && activatePoi != true && activateHead == true) {
paintLine(oldPos, geometry.getCoordinates(), '#1497f1', 0, lineText=String(oldHeading)+"°");
}
// If classic WPs is defined with a JUMP options, draw pink dashed line in-between
if (options.key == "JUMP") {
paintLine(geometry.getCoordinates(), markers[options.targetWP-1].getSource().getFeatures()[0].getGeometry().getCoordinates(), '#e935d6', 5, "Repeat x"+String(options.numRepeat));
}
// If classic WPs is defined with a heading = -1, change Boolean for POI to false. If it is defined with a value different from -1, activate Heading boolean
else if (options.key == "SET_HEAD") {
if (options.heading == "-1") {
activatePoi = false;
activateHead = false;
oldHeading = 'undefined'
}
else if (typeof options.heading != 'undefined' && options.heading != "-1") {
activateHead = true;
oldHeading = options.heading
}
}
oldPos = geometry.getCoordinates();
}
}
});
//reset text position
if (textGeom) {
textGeom.setCoordinates(map.getCoordinateFromPixel([0,0]));
}
}
*/
// function modified to take into account optional argument such color, linedash and line label
// Function modified to add action name and marker numbering to help changing icon depending on those items
/* function getPointIcon(_action, isEdit, markerNumber='') {
var dictofPoint = {
1: 'WP',
2: 'PH',
3: 'PH',
//4: '',
5: 'POI',
//6: '',
//7: 'head',
8: 'LDG'
};
return new ol.style.Style({
image: new ol.style.Icon(({
anchor: [0.5, 1],
opacity: 1,
scale: 0.5,
src: '../images/icons/cf_icon_position' + (dictofPoint[_action] != '' ? '_'+dictofPoint[_action] : '') + (isEdit ? '_edit' : '')+ '.png'
})),
text: new ol.style.Text(({
text: String(Number(markerNumber)+1),
font: '12px sans-serif',
offsetY: -15,
offsetX: -2,
fill: new ol.style.Fill({
color: '#FFFFFF'
}),
stroke: new ol.style.Stroke({
color: '#FFFFFF'
}),
}))
});
} */
// Function modified by adding parameter 1,2,3 needed in MSP, plus options dictionary to take into account WP behavior changer such as JUMP, SET_HEAD, RTH
/* function addMarker(_pos, _alt, _action, _parameter1=0, _parameter2=0, _parameter3=0, _options={key: "None"}) {
var iconFeature = new ol.Feature({
geometry: new ol.geom.Point(_pos),
name: 'Null Island',
population: 4000,
rainfall: 500
});
console.log(_pos);
iconFeature.setStyle(getPointIcon(_action, false, String(markers.length)));
var vectorSource = new ol.source.Vector({
features: [iconFeature]
});
var vectorLayer = new ol.layer.Vector({
source: vectorSource
});
vectorLayer.kind = "marker";
vectorLayer.alt = _alt;
vectorLayer.number = markers.length;
vectorLayer.action = _action;
vectorLayer.parameter1 = _parameter1;
vectorLayer.parameter2 = _parameter2;
vectorLayer.parameter3 = _parameter3;
vectorLayer.options = _options;
markers.push(vectorLayer);
return vectorLayer;
} */
/////////////////////////////////////////////
// Manage Waypoint
@ -937,8 +858,8 @@ TABS.mission_control.initialize = function (callback) {
}
}
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
cleanLines();
redrawLayer();
});
$row.find(".waypointOptions-number").text(element.getAttachedNumber()+1);
@ -959,17 +880,31 @@ TABS.mission_control.initialize = function (callback) {
alert(chrome.i18n.getMessage('MissionPlannerRTHSettingsCheck'));
}
}
else if (MWNP.WPTYPE.REV[element.getAction()] == "JUMP") {
if ($(this).val() > mission.get().length || $(this).val() < 0)
{
$(this).val(0);
alert(chrome.i18n.getMessage('MissionPlannerJumpSettingsCheck'));
}
}
element.setP1(Number($(this).val()));
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
cleanLines();
redrawLayer();
});
$row.find(".waypointOptions-p2").val(element.getP2()).change(function () {
if (MWNP.WPTYPE.REV[element.getAction()] == "JUMP") {
if ($(this).val() > 10 || $(this).val() < 0)
{
$(this).val(0);
alert(chrome.i18n.getMessage('MissionPlannerJump2SettingsCheck'));
}
}
element.setP2(Number($(this).val()));
mission.updateWaypoint(element);
cleanLayers();
redrawLayers();
cleanLines();
redrawLayer();
});
$row.find("[data-role='waypointOptions-delete']").attr("data-index", element.getAttachedNumber()+1);
@ -1079,8 +1014,9 @@ TABS.mission_control.initialize = function (callback) {
var handleShowSafehome = function () {
$('#MPeditPoint, #missionPlanerTotalInfo','#missionPlanerTemplate', '#missionPlanerSettings').hide();
$('#missionPlanerSafehome').fadeIn(300);
cleanSafehomeLayers();
renderSafehomesTable();
renderSafehomesOnMap(SAFEHOMES);
renderSafehomesOnMap();
};
button.addEventListener('click', handleShowSafehome, false);
@ -1152,8 +1088,20 @@ TABS.mission_control.initialize = function (callback) {
$('#pointLon').val(Math.round(coord[0] * 10000000) / 10000000);
$('#pointLat').val(Math.round(coord[1] * 10000000) / 10000000);
mission.updateWaypoint(tempWp);
}
repaintLine4Waypoints(mission);
}
else if (tempMarker.kind == "safehome") {
let tempSH = SAFEHOMES.getSafehome(tempMarker.number);
tempSH.setLon(coord[0]);
tempSH.setLat(coord[1]);
SAFEHOMES.updateSafehome(tempSH);
//renderSafehomesTable();
/* cleanSafehomeLayers();
renderSafehomesOnMap(); */
$safehomesTableBody.find('tr:nth-child('+String(tempMarker.number+1)+') > td > .safehome-lon').val(Math.round(coord[0] * 10000000) / 10000000);
$safehomesTableBody.find('tr:nth-child('+String(tempMarker.number+1)+') > td > .safehome-lat').val(Math.round(coord[1] * 10000000) / 10000000);
}
};
/**
@ -1217,7 +1165,8 @@ TABS.mission_control.initialize = function (callback) {
}
else {
control_list = [
new app.PlannerSettingsControl()
new app.PlannerSettingsControl(),
new app.PlannerSafehomeControl() // TO DELETE FOR RELEASE SAFEHOMES
]
}
map = new ol.Map({
@ -1308,6 +1257,7 @@ TABS.mission_control.initialize = function (callback) {
}
selectedMarker = renderWaypointOptionsTable(selectedMarker);
$('#MPeditPoint').fadeIn(300);
redrawLayer();
}
else if (selectedFeature && tempMarker.kind == "line" && tempMarker.selection) {
let tempWpCoord = ol.proj.toLonLat(evt.coordinate);
@ -1317,6 +1267,14 @@ TABS.mission_control.initialize = function (callback) {
cleanLayers();
redrawLayers();
}
else if (selectedFeature && tempMarker.kind == "safehome") {
selectedMarker = SAFEHOMES.getSafehome(tempMarker.number);
var geometry = selectedFeature.getGeometry();
var coord = ol.proj.toLonLat(geometry.getCoordinates());
$safehomesTableBody.find('tr:nth-child('+String(tempMarker.number+1)+') > td > .safehome-enabled-value').val(selectedMarker.isUsed());
$safehomesTableBody.find('tr:nth-child('+String(tempMarker.number+1)+') > td > .safehome-lon').val(Math.round(coord[0] * 10000000) / 10000000);
$safehomesTableBody.find('tr:nth-child('+String(tempMarker.number+1)+') > td > .safehome-lat').val(Math.round(coord[1] * 10000000) / 10000000);
}
else {
let tempWpCoord = ol.proj.toLonLat(evt.coordinate);
let tempWp = new Waypoint(mission.get().length, MWNP.WPTYPE.WAYPOINT, tempWpCoord[1], tempWpCoord[0], alt=settings.alt, p1=settings.speed);
@ -1460,6 +1418,19 @@ TABS.mission_control.initialize = function (callback) {
}
});
$('#showHideSafehomeButton').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') {
$('#SafehomeContent').fadeIn(300);
}
else {
$('#SafehomeContent').fadeOut(300);
}
});
/////////////////////////////////////////////
// Callback for Waypoint edition
/////////////////////////////////////////////
@ -1553,26 +1524,41 @@ TABS.mission_control.initialize = function (callback) {
if (selectedMarker) {
mission.dropAttachedFromWaypoint(selectedMarker, $(event.currentTarget).attr("data-index")-1);
renderWaypointOptionsTable(selectedMarker);
cleanLayers();
redrawLayers();
cleanLines();
redrawLayer();
}
});
$("[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();
cleanLines();
redrawLayer();
}
});
/////////////////////////////////////////////
// Callback for SAFEHOMES Table
/////////////////////////////////////////////
$safehomesTableBody.on('click', "[data-role='safehome-center']", function (event) {
let mapCenter = map.getView().getCenter();
let tmpSH = SAFEHOMES.getSafehome($(event.currentTarget).attr("data-index"));
tmpSH.setLon(ol.proj.toLonLat(mapCenter)[0]);
tmpSH.setLat(ol.proj.toLonLat(mapCenter)[1]);
SAFEHOMES.updateSafehome(tmpSH);
renderSafehomesTable();
cleanSafehomeLayers();
renderSafehomesOnMap();
});
$safehomesTableBody.on('click', "[data-role='safehome-view']", function (event) {
if (selectedMarker) {
mission.addAttachedFromWaypoint(selectedMarker);
renderWaypointOptionsTable(selectedMarker);
cleanLines();
redrawLayer();
}
});