1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

Add Safehome tab

This commit is contained in:
ArnoTlse 2021-03-02 18:43:29 +01:00
parent 89586d3ac8
commit cf80f8c9ab
12 changed files with 826 additions and 12 deletions

View file

@ -3124,6 +3124,9 @@
"missionDefaultSettingsHead": { "missionDefaultSettingsHead": {
"message": "Default settings" "message": "Default settings"
}, },
"missionSafehomeHead": {
"message": "Safe Home manager"
},
"missionTemplateHead": { "missionTemplateHead": {
"message": "Mission template" "message": "Mission template"
}, },
@ -3594,5 +3597,20 @@
}, },
"MissionPlannerHeadSettingsCheck": { "MissionPlannerHeadSettingsCheck": {
"message": "Heading value is incorrect : Check it again !" "message": "Heading value is incorrect : Check it again !"
},
"SafehomeSelected": {
"message": ""
},
"SafehomeId": {
"message": "#"
},
"SafehomeEnabled": {
"message": "Enabled"
},
"SafehomeLon": {
"message": "Lon"
},
"SafehomeLat": {
"message": "Lat"
} }
} }

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_safehome_green.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></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="4.064926"
inkscape:cx="70.17472"
inkscape:cy="76.133228"
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;"><path
id="rect1518"
style="opacity:0.994175;fill:#13af17;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1"
d="M 30 55 C 27.23 55 25 57.23 25 60 L 25 130 C 25 132.77 27.23 135 30 135 L 60.5 135 C 58.838 135 57.5 133.662 57.5 132 L 57.5 93 C 57.5 91.338 58.838 90 60.5 90 L 79.5 90 C 81.162 90 82.5 91.338 82.5 93 L 82.5 132 C 82.5 133.662 81.162 135 79.5 135 L 110 135 C 112.77 135 115 132.77 115 130 L 115 60 C 115 57.23 112.77 55 110 55 L 30 55 z " /><path
style="fill:#13af17;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 5,75 H 135 L 70,15 Z"
id="path1522"
sodipodi:nodetypes="cccc" /><rect
style="opacity:0.994175;fill:#13af17;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-rule:nonzero"
id="rect1524"
width="20"
height="35"
x="90"
y="20"
ry="3" /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2" /></svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -0,0 +1,152 @@
<?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_safehome_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></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="4.2201835"
inkscape:cx="91.119881"
inkscape:cy="70.519002"
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;"><path
id="path914"
style="fill:#f3f3f3;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 50,5 V 60 H 65 V 45 l 40,30 -40,30 V 90 H 50 v 45 h 90 V 40 H 105 V 5 Z m 0,85 V 75 60 H 5 v 15 15 z"
sodipodi:nodetypes="ccccccccccccccccccccc" /><path
style="fill:#f3f3f3;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.99607843"
d="m 110,5 v 30 h 30 z"
id="path1058" /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2" /></svg>

After

Width:  |  Height:  |  Size: 5.6 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_safehome_red.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></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="4.064926"
inkscape:cx="70.17472"
inkscape:cy="76.133228"
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;"><path
id="rect1518"
style="opacity:0.994175;fill:#af1313;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1"
d="M 30 55 C 27.23 55 25 57.23 25 60 L 25 130 C 25 132.77 27.23 135 30 135 L 60.5 135 C 58.838 135 57.5 133.662 57.5 132 L 57.5 93 C 57.5 91.338 58.838 90 60.5 90 L 79.5 90 C 81.162 90 82.5 91.338 82.5 93 L 82.5 132 C 82.5 133.662 81.162 135 79.5 135 L 110 135 C 112.77 135 115 132.77 115 130 L 115 60 C 115 57.23 112.77 55 110 55 L 30 55 z " /><path
style="fill:#af1313;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 5,75 H 135 L 70,15 Z"
id="path1522"
sodipodi:nodetypes="cccc" /><rect
style="opacity:0.994175;fill:#af1313;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-rule:nonzero"
id="rect1524"
width="20"
height="35"
x="90"
y="20"
ry="3" /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2" /></svg>

After

Width:  |  Height:  |  Size: 6.1 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_safehome_white.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></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="4.064926"
inkscape:cx="70.17472"
inkscape:cy="76.133228"
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;"><path
id="rect1518"
style="opacity:0.994175;fill:#000000;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1"
d="M 30 55 C 27.23 55 25 57.23 25 60 L 25 130 C 25 132.77 27.23 135 30 135 L 60.5 135 C 58.838 135 57.5 133.662 57.5 132 L 57.5 93 C 57.5 91.338 58.838 90 60.5 90 L 79.5 90 C 81.162 90 82.5 91.338 82.5 93 L 82.5 132 C 82.5 133.662 81.162 135 79.5 135 L 110 135 C 112.77 135 115 132.77 115 130 L 115 60 C 115 57.23 112.77 55 110 55 L 30 55 z " /><path
style="fill:#000000;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 5,75 H 135 L 70,15 Z"
id="path1522"
sodipodi:nodetypes="cccc" /><rect
style="opacity:0.994175;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill-rule:nonzero"
id="rect1524"
width="20"
height="35"
x="90"
y="20"
ry="3" /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2" /></svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -0,0 +1,60 @@
<?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_safehome_white.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"><metadata
id="metadata955"><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="defs953" /><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="namedview951"
showgrid="false"
inkscape:zoom="2.9841204"
inkscape:cx="54.451582"
inkscape:cy="68.406303"
inkscape:window-x="-6"
inkscape:window-y="-6"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" />
<g
id="g1558"
transform="translate(16.398417,2.4436968)"
style="fill:#ffffff;fill-opacity:1"><path
id="rect1518"
style="display:inline;opacity:0.994175;fill:#ffffff;fill-opacity:1;stroke-width:6;stroke-linecap:round;stroke-linejoin:round"
d="m 14.451582,48.406303 c -2.77,0 -4.9999999,2.23 -4.9999999,5 V 123.4063 c 0,2.77 2.2299999,5 4.9999999,5 h 30.5 c -1.662,0 -3,-1.338 -3,-3 V 86.406303 c 0,-1.662 1.338,-3 3,-3 h 19 c 1.662,0 3,1.338 3,3 V 125.4063 c 0,1.662 -1.338,3 -3,3 h 30.5 c 2.77,0 5,-2.23 5,-5 V 53.406303 c 0,-2.77 -2.23,-5 -5,-5 z" /><path
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M -10.548418,68.406303 H 119.45158 L 54.451582,8.4063034 Z"
id="path1522"
sodipodi:nodetypes="cccc" /><rect
style="display:inline;opacity:0.994175;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round"
id="rect1524"
width="20"
height="35"
x="74.451584"
y="13.406303"
ry="3" /></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -60,7 +60,8 @@ var CONFIG,
BATTERY_CONFIG, BATTERY_CONFIG,
OUTPUT_MAPPING, OUTPUT_MAPPING,
SETTINGS, SETTINGS,
BRAKING_CONFIG; BRAKING_CONFIG,
SAFEHOME;
var FC = { var FC = {
MAX_SERVO_RATE: 125, MAX_SERVO_RATE: 125,
@ -544,6 +545,13 @@ var FC = {
OUTPUT_MAPPING = new OutputMappingCollection(); OUTPUT_MAPPING = new OutputMappingCollection();
SETTINGS = {}; SETTINGS = {};
SAFEHOME = {
number: 0,
enabled: 0,
lon: 0,
lat: 0
};
}, },
getOutputUsages: function() { getOutputUsages: function() {
return { return {

View file

@ -215,5 +215,8 @@ var MSPCodes = {
MSP2_PID: 0x2030, MSP2_PID: 0x2030,
MSP2_SET_PID: 0x2031, MSP2_SET_PID: 0x2031,
MSP2_INAV_OPFLOW_CALIBRATION: 0x2032 MSP2_INAV_OPFLOW_CALIBRATION: 0x2032,
MSP2_INAV_SAFEHOME: 0x2038,
MSP2_INAV_SET_SAFEHOME: 0x2039
}; };

View file

@ -65,8 +65,7 @@ var mspHelper = (function (gui) {
flags, flags,
colorCount, colorCount,
color; color;
if (!dataHandler.unsupported || dataHandler.unsupported) switch (dataHandler.code) {
if (!dataHandler.unsupported) switch (dataHandler.code) {
case MSPCodes.MSP_IDENT: case MSPCodes.MSP_IDENT:
//FIXME remove this frame when proven not needed //FIXME remove this frame when proven not needed
console.log('Using deprecated msp command: MSP_IDENT'); console.log('Using deprecated msp command: MSP_IDENT');
@ -1462,7 +1461,13 @@ var mspHelper = (function (gui) {
SENSOR_DATA.temperature[i] = temp_decidegrees / 10; // °C SENSOR_DATA.temperature[i] = temp_decidegrees / 10; // °C
} }
break; break;
case MSPCodes.MSP2_INAV_SAFEHOME:
console.log(MSPCodes.MSP2_INAV_SAFEHOME);
SAFEHOME.number = data.getUint8(0);
SAFEHOME.enable = data.getUint8(1);
SAFEHOME.lon = data.getInt32(2);
SAFEHOME.lat = data.getInt32(3);
break;
default: default:
console.log('Unknown code detected: ' + dataHandler.code); console.log('Unknown code detected: ' + dataHandler.code);
} else { } else {
@ -2138,6 +2143,9 @@ var mspHelper = (function (gui) {
buffer.push(BRAKING_CONFIG.bankAngle); buffer.push(BRAKING_CONFIG.bankAngle);
break; break;
case MSPCodes.MSP2_INAV_SET_SAFEHOME:
break;
default: default:
return false; return false;

View file

@ -221,7 +221,13 @@
.ol-touch .mission-control-settings { .ol-touch .mission-control-settings {
top: 80px; top: 80px;
} }
.mission-control-safehome {
top: 85px;
left: .5em;
}
.ol-touch .mission-control-safehome {
top: 100px;
}
.mission-control-template { .mission-control-template {
top: 85px; top: 85px;
left: .5em; left: .5em;

View file

@ -26,6 +26,34 @@
</div> </div>
</div> </div>
</div> </div>
<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>
<div class="spacer">
<div>
<table class="mixer-table logic__table">
<thead>
<tr>
<th style="width: 50px" 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>
</table>
</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="missionPlanerTotalInfo" class="gui_box grey"> <div id="missionPlanerTotalInfo" class="gui_box grey">
<div class="gui_box_titlebar"> <div class="gui_box_titlebar">
<div class="spacer_box_title i18n-replaced" data-i18n="missionTotalInformationHead">Total information</div> <div class="spacer_box_title i18n-replaced" data-i18n="missionTotalInformationHead">Total information</div>

View file

@ -377,6 +377,17 @@ TABS.mission_control.initialize = function (callback) {
} }
} }
/////////////////////////////////////////////
// Manage Safehome
/////////////////////////////////////////////
function getSafeHomePointFromFC() {
console.log("Test");
}
function loadSafehome() {
MSP.send_message(MSPCodes.MSP2_INAV_SAFEHOME, false, false, getSafeHomePointFromFC);
}
///////////////////////////////////////////// /////////////////////////////////////////////
// Manage Plotting functions // Manage Plotting functions
///////////////////////////////////////////// /////////////////////////////////////////////
@ -624,7 +635,7 @@ TABS.mission_control.initialize = function (callback) {
button.style = 'background: url(\'../images/CF_settings_white.svg\') no-repeat 1px -1px;background-color: rgba(0,60,136,.5);'; button.style = 'background: url(\'../images/CF_settings_white.svg\') no-repeat 1px -1px;background-color: rgba(0,60,136,.5);';
var handleShowSettings = function () { var handleShowSettings = function () {
$('#MPeditPoint, #missionPlanerTotalInfo','#missionPlanerTemplate').hide(); $('#MPeditPoint, #missionPlanerTotalInfo','#missionPlanerTemplate', '#missionPlanerSafeHome').hide();
$('#missionPlanerSettings').fadeIn(300); $('#missionPlanerSettings').fadeIn(300);
}; };
@ -644,6 +655,41 @@ TABS.mission_control.initialize = function (callback) {
}; };
ol.inherits(app.PlannerSettingsControl, ol.control.Control); ol.inherits(app.PlannerSettingsControl, ol.control.Control);
/**
* @constructor
* @extends {ol.control.Control}
* @param {Object=} opt_options Control options.
*/
app.PlannerSafehomeControl = function (opt_options) {
var options = opt_options || {};
var button = document.createElement('button');
button.innerHTML = ' ';
button.style = 'background: url(\'../images/icons/cf_icon_safehome_white.svg\') no-repeat 1px -1px;background-color: rgba(0,60,136,.5);';
var handleShowSafehome = function () {
$('#MPeditPoint, #missionPlanerTotalInfo','#missionPlanerTemplate', '#missionPlanerSettings').hide();
$('#missionPlanerSafeHome').fadeIn(300);
loadSafehome();
};
button.addEventListener('click', handleShowSafehome, false);
button.addEventListener('touchstart', handleShowSafehome, false);
var element = document.createElement('div');
element.className = 'mission-control-safehome ol-unselectable ol-control';
element.appendChild(button);
element.title = 'MP Safehome';
ol.control.Control.call(this, {
element: element,
target: options.target
});
};
ol.inherits(app.PlannerSafehomeControl, ol.control.Control);
/** /**
* @param {ol.MapBrowserEvent} evt Map browser event. * @param {ol.MapBrowserEvent} evt Map browser event.
* @return {boolean} `true` to start the drag sequence. * @return {boolean} `true` to start the drag sequence.
@ -739,16 +785,24 @@ TABS.mission_control.initialize = function (callback) {
} else { } else {
mapLayer = new ol.source.OSM(); mapLayer = new ol.source.OSM();
} }
if (CONFIGURATOR.connectionValid) {
control_list = [
new app.PlannerSettingsControl(),
new app.PlannerSafehomeControl()
]
}
else {
control_list = [
new app.PlannerSettingsControl()
]
}
map = new ol.Map({ map = new ol.Map({
controls: ol.control.defaults({ controls: ol.control.defaults({
attributionOptions: { attributionOptions: {
collapsible: false collapsible: false
} }
}).extend([ }).extend(control_list),
new app.PlannerSettingsControl(),
//new app.PlannerTemplateControl()
]),
interactions: ol.interaction.defaults().extend([new app.Drag()]), interactions: ol.interaction.defaults().extend([new app.Drag()]),
layers: [ layers: [
new ol.layer.Tile({ new ol.layer.Tile({