Browse Source

new file: img/blocks/LARS.svg

	new file:   img/blocks/LARS_BLH.svg
	new file:   img/blocks/LARS_BLL.svg
	new file:   img/blocks/LARS_BRH.svg
	new file:   img/blocks/LARS_BRL.svg
	new file:   img/blocks/LARS_FLH.svg
	new file:   img/blocks/LARS_FLL.svg
	new file:   img/blocks/LARS_FRH.svg
	new file:   img/blocks/LARS_FRL.svg
	new file:   img/blocks/acknowledgements.html
	new file:   lang/LARS.json
	modified:   lars_blocks.js
	modified:   src/LARS.cpp
	modified:   src/LARS.h
pull/1/head
roboticafacil 1 year ago
parent
commit
84f01d277b

+ 65
- 0
img/blocks/LARS.svg View File

@@ -0,0 +1,65 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /></svg>

+ 71
- 0
img/blocks/LARS_BLH.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_BLH.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><ellipse
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="path4525-2"
68
+     cx="18.429653"
69
+     cy="50.682549"
70
+     rx="7.3946142"
71
+     ry="7.508378" /></svg>

+ 71
- 0
img/blocks/LARS_BLL.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_BLL.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><rect
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77202845;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="rect4551-2"
68
+     width="12.764831"
69
+     height="14.320644"
70
+     x="0.24553759"
71
+     y="61.641895" /></svg>

+ 71
- 0
img/blocks/LARS_BRH.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_BRH.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><ellipse
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="path4525-2"
68
+     cx="56.881649"
69
+     cy="49.089863"
70
+     rx="7.3946142"
71
+     ry="7.508378" /></svg>

+ 71
- 0
img/blocks/LARS_BRL.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_BRL.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><rect
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77249622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="rect4551"
68
+     width="12.766374"
69
+     height="14.320638"
70
+     x="63.376617"
71
+     y="61.641895" /></svg>

+ 71
- 0
img/blocks/LARS_FLH.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_FLH.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><ellipse
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="path4525-2"
68
+     cx="19.112232"
69
+     cy="32.480423"
70
+     rx="7.3946142"
71
+     ry="7.508378" /></svg>

+ 71
- 0
img/blocks/LARS_FLL.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_FLL.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><rect
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.5590539;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="rect4551-2"
68
+     width="12.074839"
69
+     height="14.32064"
70
+     x="0.24245729"
71
+     y="-0.02453734" /></svg>

+ 71
- 0
img/blocks/LARS_FRH.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_FRH.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><ellipse
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:110.7085495;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="path4525"
68
+     cx="57.751133"
69
+     cy="31.295048"
70
+     rx="7.3946142"
71
+     ry="7.508378" /></svg>

+ 71
- 0
img/blocks/LARS_FRL.svg View File

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   version="1.1"
13
+   id="Capa_1"
14
+   x="0px"
15
+   y="0px"
16
+   width="75.938px"
17
+   height="75.938px"
18
+   viewBox="0 0 75.938 75.938"
19
+   style="enable-background:new 0 0 75.938 75.938;"
20
+   xml:space="preserve"
21
+   sodipodi:docname="LARS_FRL.svg"
22
+   inkscape:version="0.92.1 r15371"><metadata
23
+     id="metadata43"><rdf:RDF><cc:Work
24
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
26
+     id="defs41" /><sodipodi:namedview
27
+     pagecolor="#ffffff"
28
+     bordercolor="#666666"
29
+     borderopacity="1"
30
+     objecttolerance="10"
31
+     gridtolerance="10"
32
+     guidetolerance="10"
33
+     inkscape:pageopacity="0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:window-width="1366"
36
+     inkscape:window-height="705"
37
+     id="namedview39"
38
+     showgrid="false"
39
+     inkscape:zoom="4.3950905"
40
+     inkscape:cx="57.872316"
41
+     inkscape:cy="52.258221"
42
+     inkscape:window-x="-8"
43
+     inkscape:window-y="-8"
44
+     inkscape:window-maximized="1"
45
+     inkscape:current-layer="Capa_1" /><path
46
+     d="m 62.689709,34.172256 c 5.866461,-5.260644 9.65833,-12.273531 9.65833,-20.165801 h 3.79803 V -0.02453734 H 63.379699 V 14.296103 h 3.79649 c 0,6.137418 -2.761504,11.982578 -7.246445,16.365143 L 49.581422,20.725779 H 26.117114 L 15.767251,30.661246 C 11.282311,26.278681 8.5223473,20.725779 8.5223473,14.296103 H 12.317296 V -0.02453734 H 0.24245728 V 14.296103 H 4.0374069 c 0,7.889662 3.7949495,14.905158 9.6598721,20.165801 -2.27833,7.961066 -2.099482,5.278205 0.003,13.443867 -4.1399459,3.799354 -7.2449047,8.475482 -8.9698817,13.736126 H 0.24553759 v 14.32064 H 13.010368 v -14.32064 h -2.759963 c 1.034986,-3.79805 3.449954,-7.015497 6.209918,-9.936772 l 10.004866,9.936772 h 23.461229 l 10.000246,-9.936772 c 3.10958,2.921275 5.176471,6.138722 6.211458,9.936772 h -2.761504 v 14.32064 h 12.76637 v -14.32064 h -4.831475 c -1.379982,-5.260644 -4.48494,-9.936772 -8.969881,-13.736126 1.652684,-8.801963 1.743027,-5.465526 0.348077,-13.733515 z"
47
+     id="path2"
48
+     inkscape:connector-curvature="0"
49
+     sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc"
50
+     style="stroke-width:1.41756129" /><g
51
+     id="g8" /><g
52
+     id="g10" /><g
53
+     id="g12" /><g
54
+     id="g14" /><g
55
+     id="g16" /><g
56
+     id="g18" /><g
57
+     id="g20" /><g
58
+     id="g22" /><g
59
+     id="g24" /><g
60
+     id="g26" /><g
61
+     id="g28" /><g
62
+     id="g30" /><g
63
+     id="g32" /><g
64
+     id="g34" /><g
65
+     id="g36" /><rect
66
+     style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:7.77249622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
67
+     id="rect4551"
68
+     width="12.766368"
69
+     height="14.32064"
70
+     x="63.3797"
71
+     y="-0.02453734" /></svg>

+ 1
- 0
img/blocks/acknowledgements.html View File

@@ -0,0 +1 @@
1
+<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>

+ 36
- 0
lang/LARS.json View File

@@ -0,0 +1,36 @@
1
+{
2
+	"langs": 
3
+	{
4
+		"en-GB": 
5
+		{
6
+			"keys": 
7
+			{
8
+				"LANG_LARS_INIT_TOOLTIP": "Defines the servo pins for a quadruped robot.",
9
+				"LANG_LARS_MOVEMENT": "Move robot",
10
+				"LANG_LARS_MOVEMENT_MOVEMENT": "Movement",
11
+				"LANG_LARS_MOVEMENT_HOME": "Home",
12
+				"LANG_LARS_MOVEMENT_WALK": "Walk",
13
+				"LANG_LARS_MOVEMENT_OMNIWALK": "Omni walk",
14
+				"LANG_LARS_MOVEMENT_TURN_LEFT": "Turn left",
15
+				"LANG_LARS_MOVEMENT_TURN_RIGHT": "Turn right",
16
+				"LANG_LARS_MOVEMENT_MOONWALK": "Moonwalk",
17
+				"LANG_LARS_MOVEMENT_DANCE": "Dance",
18
+				"LANG_LARS_MOVEMENT_UPDOWN": "Up-down",
19
+				"LANG_LARS_MOVEMENT_PUSHUP": "Push-up",
20
+				"LANG_LARS_MOVEMENT_HELLO": "Hello",
21
+				"LANG_LARS_MOVEMENT_WAVE": "Wave",
22
+				"LANG_LARS_MOVEMENT_LEG_NUMBER": "Leg number",
23
+				"LANG_LARS_MOVEMENT_STEPS": "Steps",
24
+				"LANG_LARS_MOVEMENT_PERIOD": "Period",
25
+				"LANG_LARS_MOVEMENT_DIR": "Direction",
26
+				"LANG_LARS_MOVEMENT_SIDE": "Side",
27
+				"LANG_LARS_MOVEMENT_TURN_FACTOR": "Turn factor",
28
+				"LANG_LARS_MOVEMENT_FORWARD": "Forward",
29
+				"LANG_LARS_MOVEMENT_BACKWARD": "Backward",
30
+				"LANG_LARS_MOVEMENT_YES": "Yes",
31
+				"LANG_LARS_MOVEMENT_NO": "No",
32
+				"LANG_LARS_MOVEMENT_TOOLTIP": "Generates movement primitives for a quadruped robot"
33
+			}
34
+		}
35
+	}
36
+}

+ 200
- 349
lars_blocks.js View File

@@ -1,349 +1,200 @@
1
-/*
2
-Blockly.Blocks['espui_prepare_fs'] = {
3
-    category: 'ESPUI',
4
-    colour: '#3357c7',
5
-    helpUrl: Facilino.getHelpUrl('espui'),
6
-    tags: ['webinterface'],
7
-    examples: ['lol.bly'],
8
-    init: function() {
9
-        var wifiOptions = [
10
-            ['No', false],
11
-            ['Yes', true]
12
-          ];
13
-        this.appendDummyInput()
14
-            .appendField('Prepare FileSystem (upload once without other in setup code, then omit)');
15
-    }
16
-};
17
-
18
-Blockly.Arduino['espui_prepare_fs'] = function(block) {
19
-    var wifi_option = block.getFieldValue('wifi_option');
20
-    Blockly.Arduino.definitions_['define_espui_h'] = '#include <ESPUI.h>';
21
-    Blockly.Arduino.setups_['setup_espui'] = '\n';
22
-    Blockly.Arduino.setups_['setup_espui'] += '    ESPUI.prepareFileSystem();\n';
23
-    return null;
24
-};
25
-
26
- */
27
-Blockly.Blocks['walk_forward'] = {
28
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
29
-  helpUrl: Facilino.getHelpUrl('walk_forward'),
30
-  tags: [],
31
-  examples: [],
32
-	  init: function() {
33
-	this.setPreviousStatement(true, null);
34
-	this.setNextStatement(true, null);
35
-    this.appendDummyInput()
36
-        .appendField("Walking");
37
-    this.setColour("#FF00FF");
38
-    this.setTooltip("");
39
-
40
-  }
41
-};
42
-
43
-Blockly.Arduino['walk_forward'] = function(block) {
44
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
45
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
46
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
47
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
48
-  var code='';
49
-  code+='robot.walk();\n';
50
-  code+= '\n';
51
-  return code;
52
-};
53
-
54
-Blockly.Blocks['walk_backward'] = {
55
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
56
-  helpUrl: Facilino.getHelpUrl('walk_backward'),
57
-  tags: [],
58
-  examples: [],
59
-	  init: function() {
60
-	this.setPreviousStatement(true, null);
61
-	this.setNextStatement(true, null);
62
-    this.appendDummyInput()
63
-        .appendField("Walking_Back");
64
-    this.setColour("#FF00FF");
65
-    this.setTooltip("");
66
-
67
-  }
68
-};
69
-
70
-Blockly.Arduino['walk_backward'] = function(block) {
71
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
72
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
73
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
74
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
75
-  var code='';
76
-  code+='robot.walk(0);\n';
77
-  code+= '\n';
78
-  return code;
79
-};
80
-
81
-Blockly.Blocks['Turn_R'] = {
82
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
83
-  helpUrl: Facilino.getHelpUrl('Turn_R'),
84
-  tags: [],
85
-  examples: [],
86
-	  init: function() {
87
-	this.setPreviousStatement(true, null);
88
-	this.setNextStatement(true, null);
89
-    this.appendDummyInput()
90
-        .appendField("Turn_Right");
91
-    this.setColour("#FF00FF");
92
-    this.setTooltip("");
93
-
94
-  }
95
-};
96
-
97
-Blockly.Arduino['Turn_R'] = function(block) {
98
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
99
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
100
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
101
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
102
-  var code='';
103
-  code+='robot.turnR(1, 550);\n';
104
-  code+= '\n';
105
-  return code;
106
-};
107
-
108
-Blockly.Blocks['Turn_L'] = {
109
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
110
-  helpUrl: Facilino.getHelpUrl('Turn_L'),
111
-  tags: [],
112
-  examples: [],
113
-	  init: function() {
114
-	this.setPreviousStatement(true, null);
115
-	this.setNextStatement(true, null);
116
-    this.appendDummyInput()
117
-        .appendField("Turn_Left");
118
-    this.setColour("#FF00FF");
119
-    this.setTooltip("");
120
-
121
-  }
122
-};
123
-
124
-Blockly.Arduino['Turn_L'] = function(block) {
125
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
126
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
127
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
128
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
129
-  var code='';
130
-  code+='robot.turnL(1, 550);\n';
131
-  code+= '\n';
132
-  return code;
133
-};
134
-
135
-Blockly.Blocks['PushUp'] = {
136
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
137
-  helpUrl: Facilino.getHelpUrl('PushUp'),
138
-  tags: [],
139
-  examples: [],
140
-	  init: function() {
141
-	this.setPreviousStatement(true, null);
142
-	this.setNextStatement(true, null);
143
-    this.appendDummyInput()
144
-        .appendField("Push_Up");
145
-    this.setColour("#FF00FF");
146
-    this.setTooltip("");
147
-
148
-  }
149
-};
150
-
151
-Blockly.Arduino['PushUp'] = function(block) {
152
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
153
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
154
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
155
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
156
-  var code='';
157
-  code+='robot.pushUp(1, 600);\n';
158
-  code+= '\n';
159
-  return code;
160
-};
161
-
162
-Blockly.Blocks['UpDown'] = {
163
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
164
-  helpUrl: Facilino.getHelpUrl('UpDown'),
165
-  tags: [],
166
-  examples: [],
167
-	  init: function() {
168
-	this.setPreviousStatement(true, null);
169
-	this.setNextStatement(true, null);
170
-    this.appendDummyInput()
171
-        .appendField("Up_Down");
172
-    this.setColour("#FF00FF");
173
-    this.setTooltip("");
174
-
175
-  }
176
-};
177
-
178
-Blockly.Arduino['UpDown'] = function(block) {
179
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
180
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
181
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
182
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
183
-  var code='';
184
-  code+='robot.upDown(1, 5000);\n';
185
-  code+= '\n';
186
-  return code;
187
-};
188
-
189
-Blockly.Blocks['Dance'] = {
190
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
191
-  helpUrl: Facilino.getHelpUrl('Dance'),
192
-  tags: [],
193
-  examples: [],
194
-	  init: function() {
195
-	this.setPreviousStatement(true, null);
196
-	this.setNextStatement(true, null);
197
-    this.appendDummyInput()
198
-        .appendField("Dance");
199
-    this.setColour("#FF00FF");
200
-    this.setTooltip("");
201
-
202
-  }
203
-};
204
-
205
-Blockly.Arduino['Dance'] = function(block) {
206
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
207
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
208
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
209
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
210
-  var code='';
211
-  code+='robot.dance(1, 600);\n';
212
-  code+= '\n';
213
-  return code;
214
-};
215
-
216
-Blockly.Blocks['Wave'] = {
217
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
218
-  helpUrl: Facilino.getHelpUrl('Wave'),
219
-  tags: [],
220
-  examples: [],
221
-	  init: function() {
222
-	this.setPreviousStatement(true, null);
223
-	this.setNextStatement(true, null);
224
-    this.appendDummyInput()
225
-        .appendField("Wave");
226
-    this.setColour("#FF00FF");
227
-    this.setTooltip("");
228
-
229
-  }
230
-};
231
-
232
-Blockly.Arduino['Wave'] = function(block) {
233
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
234
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
235
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
236
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
237
-  var code='';
238
-  code+='robot.wave();\n';
239
-  code+= '\n';
240
-  return code;
241
-};
242
-
243
-Blockly.Blocks['Slow_Turn_R'] = {
244
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
245
-  helpUrl: Facilino.getHelpUrl('Slow_Turn_R'),
246
-  tags: [],
247
-  examples: [],
248
-	  init: function() {
249
-	this.setPreviousStatement(true, null);
250
-	this.setNextStatement(true, null);
251
-    this.appendDummyInput()
252
-        .appendField("Slow_Turn_Right");
253
-    this.setColour("#FF00FF");
254
-    this.setTooltip("");
255
-
256
-  }
257
-};
258
-
259
-Blockly.Arduino['Slow_Turn_R'] = function(block) {
260
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
261
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
262
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
263
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
264
-  var code='';
265
-  code+='robot.omniWalk(1, 600, true, 1);\n';
266
-  code+= '\n';
267
-  return code;
268
-};
269
-
270
-Blockly.Blocks['Slow_Turn_L'] = {
271
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
272
-  helpUrl: Facilino.getHelpUrl('Slow_Turn_L'),
273
-  tags: [],
274
-  examples: [],
275
-	  init: function() {
276
-	this.setPreviousStatement(true, null);
277
-	this.setNextStatement(true, null);
278
-    this.appendDummyInput()
279
-        .appendField("Slow_Turn_Left");
280
-    this.setColour("#FF00FF");
281
-    this.setTooltip("");
282
-
283
-  }
284
-};
285
-
286
-Blockly.Arduino['Slow_Turn_L'] = function(block) {
287
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
288
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
289
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
290
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
291
-  var code='';
292
-  code+='robot.omniWalk(1, 600, false, 1);\n';
293
-  code+= '\n';
294
-  return code;
295
-};
296
-
297
-Blockly.Blocks['MoonWalk'] = {
298
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
299
-  helpUrl: Facilino.getHelpUrl('MoonWalk'),
300
-  tags: [],
301
-  examples: [],
302
-	  init: function() {
303
-	this.setPreviousStatement(true, null);
304
-	this.setNextStatement(true, null);
305
-    this.appendDummyInput()
306
-        .appendField("Moonwalk");
307
-    this.setColour("#FF00FF");
308
-    this.setTooltip("");
309
-
310
-  }
311
-};
312
-
313
-Blockly.Arduino['MoonWalk'] = function(block) {
314
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
315
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
316
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
317
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
318
-  var code='';
319
-  code+='robot.moonwalkL(1, 5000);\n';
320
-  code+= '\n';
321
-  return code;
322
-};
323
-
324
-Blockly.Blocks['Hello'] = {
325
-  category: Facilino.locales.getKey('LANG_CATEGORY_BLOCKS'),
326
-  helpUrl: Facilino.getHelpUrl('Hello'),
327
-  tags: [],
328
-  examples: [],
329
-	  init: function() {
330
-	this.setPreviousStatement(true, null);
331
-	this.setNextStatement(true, null);
332
-    this.appendDummyInput()
333
-        .appendField("Audience_Hello");
334
-    this.setColour("#FF00FF");
335
-    this.setTooltip("");
336
-
337
-  }
338
-};
339
-
340
-Blockly.Arduino['Hello'] = function(block) {
341
-	Blockly.Arduino.setups_['setup_']='robot.init();\n ';
342
-	var input_shall_walk = Blockly.Arduino.valueToCode(block, 'shall_walk', Blockly.Arduino.ORDER_ATOMIC);
343
-  Blockly.Arduino.definitions_['define_lars_h']='#include <LARS.h>';
344
-  Blockly.Arduino.definitions_['declare_var_define_robot']='LARS robot;';
345
-  var code='';
346
-  code+='robot.hello();\n';
347
-  code+= '\n';
348
-  return code;
349
-};
1
+Facilino.LANG_COLOUR_MOVEMENT = '#CECE42';
2
+Facilino.LANG_COLOUR_MOVEMENT_WALK = '#8D8D25';
3
+
4
+Blockly.Blocks['LARS_init'] = {
5
+	category: Facilino.locales.getKey('LANG_CATEGORY_MOVEMENT'),
6
+	subcategory: Facilino.locales.getKey('LANG_SUBCATEGORY_WALK'),
7
+	helpUrl: Facilino.getHelpUrl('LARS_init'),
8
+	category_colour: Facilino.LANG_COLOUR_MOVEMENT,
9
+	colour: Facilino.LANG_COLOUR_MOVEMENT_WALK,
10
+	tags: [],
11
+	examples: [],
12
+	init: function () {
13
+		this.setPreviousStatement(true,'code');
14
+		this.setNextStatement(true,'code');
15
+		this.setColour(Facilino.LANG_COLOUR_MOVEMENT_WALK);
16
+		this.setTooltip(Facilino.locales.getKey('LANG_LARS_INIT_TOOLTIP'));
17
+	}
18
+}
19
+
20
+Blockly.Arduino['LARS_movement'] = function() {
21
+				var code='';
22
+				var movement = this.getFieldValue('MOVEMENT');
23
+				if (movement==='0')
24
+					code+='lars.home();\n';
25
+				else if (movement==='1')
26
+					code+='lars.hello();\n';
27
+				else if (movement==='2')
28
+					code+='lars.wave('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+');\n';
29
+				else if (movement==='3')
30
+					code+='lars.turnL('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
31
+				else if (movement==='4')
32
+					code+='lars.turnR('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
33
+				else if (movement==='5')
34
+					code+='lars.moonwalk('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '5000')+');\n';
35
+				else if (movement==='6')
36
+					code+='lars.dance('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
37
+				else if (movement==='7')
38
+					code+='lars.upDown('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '5000')+');\n';
39
+				else if (movement==='8')
40
+					code+='lars.pushUp('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '600')+');\n';
41
+				else if (movement==='9')
42
+					code+='lars.walk('+this.getFieldValue('FIELD3')+','+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '800')+');\n';
43
+				else if (movement==='10')
44
+					code+='lars.omniWalk('+(Blockly.Arduino.valueToCode(this, 'INP1', Blockly.Arduino.ORDER_ATOMIC) || '1')+','+(Blockly.Arduino.valueToCode(this, 'INP2', Blockly.Arduino.ORDER_ATOMIC) || '800')+','+this.getFieldValue('FIELD3')+','+(Blockly.Arduino.valueToCode(this, 'INP4', Blockly.Arduino.ORDER_ATOMIC) || '0')+');\n';
45
+				return code;
46
+			}
47
+
48
+			Blockly.Blocks['LARS_movement'] = {
49
+				category: Facilino.locales.getKey('LANG_CATEGORY_MOVEMENT'),
50
+				subcategory: Facilino.locales.getKey('LANG_SUBCATEGORY_WALK'),
51
+				tags: [],
52
+				helpUrl: Facilino.getHelpUrl('LARS_movement'),
53
+				examples: [],
54
+				category_colour: Facilino.LANG_COLOUR_MOVEMENT,
55
+				colour: Facilino.LANG_COLOUR_MOVEMENT_WALK,
56
+				init: function() {
57
+					this.setColour(Facilino.LANG_COLOUR_MOVEMENT_WALK);
58
+					var movement = new Blockly.FieldDropdown([
59
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_HOME'),'0'],
60
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_HELLO'),'1'],
61
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_WAVE'),'2'],
62
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_LEFT'),'3'],
63
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_RIGHT'),'4'],
64
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_MOONWALK'),'5'],
65
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_DANCE'),'6'],
66
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_UPDOWN'),'7'],
67
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_PUSHUP'),'8'],
68
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_WALK'),'9'],
69
+					[Facilino.locales.getKey('LANG_LARS_MOVEMENT_OMNIWALK'),'10']
70
+					]);
71
+				this.appendDummyInput().appendField(new Blockly.FieldImage('img/blocks/LARS.svg', 32*options.zoom, 32*options.zoom)).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT'));
72
+				this.appendDummyInput('').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_MOVEMENT')).appendField(movement,'MOVEMENT').setAlign(Blockly.ALIGN_RIGHT);
73
+				this.last_movement = -1;
74
+				this._inp1_removed = true;
75
+				this._inp2_removed = true;
76
+				this._inp3_removed = true;
77
+				this._inp4_removed = true;
78
+				this.checkMovement();
79
+				this.last_movement = this.getFieldValue('MOVEMENT');
80
+				this.setInputsInline(false);
81
+				this.setPreviousStatement(true,'code');
82
+					this.setNextStatement(true,'code');
83
+				this.setOutput(false);
84
+					this.setTooltip(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TOOLTIP'));
85
+				},
86
+				checkMovement: function() {
87
+				var _movement = this.getFieldValue('MOVEMENT');
88
+					try {
89
+							if (_movement<10)
90
+							{
91
+								this._inp4_removed=true;
92
+								this.removeInput('INP4');
93
+							}
94
+					} catch (e) {}
95
+					try {
96
+							if (_movement<9)
97
+							{
98
+								this._inp3_removed=true;
99
+								this.removeInput('INP3');
100
+							}
101
+					} catch (e) {}
102
+					try {
103
+							if (_movement<3)
104
+							{
105
+								this._inp2_removed=true;
106
+								this.removeInput('INP2');
107
+							}
108
+					} catch (e) {}
109
+					try {
110
+						if (_movement<2)
111
+							{
112
+								this._inp1_removed=true;
113
+								this.removeInput('INP1');
114
+							}
115
+					} catch (e) {}	
116
+					if ( _movement === '2') {
117
+						if (this._inp1_removed)
118
+						{
119
+							this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_LEG_NUMBER'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
120
+							this._inp1_removed=false;
121
+						}
122
+						else
123
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_LEG_NUMBER'),'TEXT1');}catch (e) {}	
124
+					} else if (( _movement >= '3')&&( _movement <= '8')) {
125
+						if (this._inp1_removed)
126
+						{
127
+							this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
128
+							this._inp1_removed=false;
129
+						}
130
+						else
131
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}	
132
+						if (this._inp2_removed)
133
+						{
134
+							this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD','TEXT2')).setAlign(Blockly.ALIGN_RIGHT);
135
+							this._inp2_removed=false;
136
+						}
137
+						else 
138
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}	
139
+					} else if ( _movement === '9') {
140
+						if (this._inp1_removed)
141
+						{
142
+							this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
143
+							this._inp1_removed=false;
144
+						}
145
+						else
146
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}
147
+						if (this._inp2_removed)
148
+						{
149
+							this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2').setAlign(Blockly.ALIGN_RIGHT);
150
+							this._inp2_removed=false;
151
+						}
152
+						else
153
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}	
154
+						if (this._inp3_removed)
155
+						{
156
+							this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([['Forward','0'],['Backward','1']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
157
+							this._inp3_removed=false;
158
+						}
159
+						else
160
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3'); this.getInput('INP3').removeField('FIELD3'); this.getInput('INP3').appendField(new Blockly.FieldDropdown([['Forward','0'],['Backward','1']]),'FIELD3');}catch (e) {}	
161
+					}
162
+					else if ( _movement === '10') {
163
+						if (this._inp1_removed)
164
+						{
165
+							this.appendValueInput('INP1').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1').setAlign(Blockly.ALIGN_RIGHT);
166
+							this._inp1_removed=false;
167
+						}
168
+						else
169
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_STEPS'),'TEXT1');}catch (e) {}
170
+						if (this._inp2_removed)
171
+						{
172
+							this.appendValueInput('INP2').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2').setAlign(Blockly.ALIGN_RIGHT);
173
+							this._inp2_removed=false;
174
+						}
175
+						else
176
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_PERIOD'),'TEXT2');}catch (e) {}
177
+						if (this._inp3_removed)
178
+						{
179
+							this.appendDummyInput('INP3').appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_DIR'),'TEXT3').appendField(new Blockly.FieldDropdown([['Yes','true'],['No','false']]),'FIELD3').setAlign(Blockly.ALIGN_RIGHT);
180
+							this._inp3_removed=false;
181
+						}
182
+						else
183
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_SIDE'),'TEXT3'); this.getInput('INP3').removeField('FIELD3'); this.getInput('INP3').appendField(new Blockly.FieldDropdown([['Yes','true'],['No','false']]),'FIELD3');}catch (e) {}
184
+						if (this._inp4_removed)
185
+						{
186
+							this.appendValueInput('INP4').setCheck(Number).appendField(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_FACTOR'),'TEXT4').setAlign(Blockly.ALIGN_RIGHT);
187
+							this._inp4_removed=false;
188
+						}
189
+						else
190
+							try{this.setFieldValue(Facilino.locales.getKey('LANG_LARS_MOVEMENT_TURN_FACTOR'),'TEXT4');}catch (e) {}
191
+						
192
+					}
193
+				},
194
+				onchange: function() {
195
+					if (this.getFieldValue('MOVEMENT') !== this.last_movement) {
196
+						this.checkMovement();
197
+						this.last_movement = this.getFieldValue('MOVEMENT');
198
+					}
199
+				}
200
+			};

+ 12
- 0
src/LARS.cpp View File

@@ -59,6 +59,18 @@ void LARS::init() {
59 59
   home();
60 60
 }
61 61
 
62
+void init(int FRH, int FLH, int BRH, int BLH, int FRL, int FLL, int BRL, int BLL)
63
+{
64
+	board_pins[FRONT_RIGHT_HIP] = FRH; // front right inner
65
+	board_pins[FRONT_LEFT_HIP] = FLH; // front left inner
66
+	board_pins[BACK_RIGHT_HIP] = BRH; // back right inner
67
+	board_pins[BACK_LEFT_HIP] = BLH; // back left inner
68
+	board_pins[FRONT_RIGHT_LEG] = FRL; // front right outer
69
+	board_pins[FRONT_LEFT_LEG] = FLL; //  front left outer       // POSITIONS LOOKING FROM THE MIDDLE OF THE ROBOT!!!!!
70
+	board_pins[BACK_RIGHT_LEG] = BRL; // back right outer
71
+	board_pins[BACK_LEFT_LEG] = BLL; // back left outer
72
+}
73
+
62 74
 void LARS::turnR(float steps, float T = 600) {
63 75
   //int x_amp = 15;
64 76
   //int z_amp = 15;

+ 1
- 0
src/LARS.h View File

@@ -20,6 +20,7 @@ class LARS {
20 20
   public:
21 21
     LARS();
22 22
     void init();
23
+	void init(int FRH, int FLH, int BRH, int BLH, int FRL, int FLL, int BRL, int BLL);
23 24
     void walk(int dir = 1, float steps = 1, float T = 800); // T initial 400
24 25
     void omniWalk(float steps, float T, bool side, float turn_factor);
25 26
     void turnL(float steps, float period);

Loading…
Cancel
Save