-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled Diagram.drawio
144 lines (144 loc) · 15.9 KB
/
Untitled Diagram.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<mxfile host="app.diagrams.net" modified="2020-12-27T17:59:11.941Z" agent="5.0 (Windows)" etag="S82RyILoyXgQzqTPngV6" version="14.1.2" type="github">
<diagram name="Page-1" id="e7e014a7-5840-1c2e-5031-d8a46d1fe8dd">
<mxGraphModel dx="1135" dy="451" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="826" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="2" value="Librairies and variables" style="swimlane;whiteSpace=wrap" parent="1" vertex="1">
<mxGeometry x="20" y="23" width="230" height="780" as="geometry" />
</mxCell>
<mxCell id="5" value="t=0" style="ellipse;shape=startState;fillColor=#000000;fontColor=#FFFFFF;strokeColor=#D79B00;" parent="2" vertex="1">
<mxGeometry x="100" y="40" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="6" value="" style="edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;endFill=1;rounded=0;strokeColor=#D79B00;" parent="2" source="5" edge="1">
<mxGeometry x="100" y="40" as="geometry">
<mxPoint x="115.5" y="110" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#FFFFFF;fillColor=#ffe6cc;strokeColor=#D79B00;" parent="2" source="uZpNa7PoxAKmWT-TbL3o-42" target="uZpNa7PoxAKmWT-TbL3o-43" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-42" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>Librairies</b><br></p><hr><p style="margin: 0px ; margin-left: 8px">hulp_arduino.h</p><p style="margin: 0px ; margin-left: 8px">math.h<br></p><p style="margin: 0px ; margin-left: 8px"><br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="2" vertex="1">
<mxGeometry x="35" y="112" width="160" height="68" as="geometry" />
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeColor=#D79B00;fontColor=#FFFFFF;" parent="2" source="uZpNa7PoxAKmWT-TbL3o-43" target="uZpNa7PoxAKmWT-TbL3o-52" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="115.5" y="292" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-43" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>SoC variables</b><br></p><hr><p style="margin: 0px ; margin-left: 8px">TIME_TO_SLEEP = 60 (in s)</p><p style="margin: 0px ; margin-left: 8px">DIAMETER = 0.07<br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="2" vertex="1">
<mxGeometry x="20" y="212" width="190" height="68" as="geometry" />
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-52" value="<p style="margin: 4px 0px 0px ; text-decoration: underline" align="center"><b>Ulp variables</b><br></p><hr align="left"><p style="margin: 0px ; margin-left: 8px" align="left">PIN_ANEMO = 35<br></p><p style="margin: 0px ; margin-left: 8px" align="left">ACQUISITION = 3 <br></p><p style="margin: 0px ; margin-left: 8px" align="left">COUNTER_ANEMO = 0</p><p style="margin: 0px ; margin-left: 8px" align="left">WINDSPD = 0</p><p style="margin: 0px ; margin-left: 8px" align="left">GUTS = 0</p><div align="left">&nbsp;&nbsp; NB_ACQ = 0</div><div align="left">&nbsp;&nbsp; DEBOUNCE_TIME = 75 (in&nbsp; ms)<br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="2" vertex="1">
<mxGeometry x="20" y="312" width="190" height="138" as="geometry" />
</mxCell>
<mxCell id="3" value="ulp_init()" style="swimlane;whiteSpace=wrap" parent="1" vertex="1">
<mxGeometry x="250" y="23" width="320" height="780" as="geometry" />
</mxCell>
<mxCell id="uZpNa7PoxAKmWT-TbL3o-50" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>Labels</b><br></p><hr><p style="margin: 0px ; margin-left: 8px">LBL_BEGIN</p><p style="margin: 0px ; margin-left: 8px">LBL_TRIGGERED<br></p><div>&nbsp;&nbsp; LBL_ACQUISITION</div><div align="left">&nbsp;&nbsp; LBL_GUTS<br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="3" vertex="1">
<mxGeometry x="80.97" y="30" width="160" height="90" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-39" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>LBL_BEGIN</b><br></p><hr><div align="center">Reset COUNT_ANEMO = 0</div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="3">
<mxGeometry x="80.97" y="137" width="160" height="48" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-40" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="3" source="uZpNa7PoxAKmWT-TbL3o-50" target="p1ojiiCee6jBFZuR8EvP-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-58" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-45" target="p1ojiiCee6jBFZuR8EvP-52">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-45" value="Pin anemo triggered ?" style="rhombus;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;" vertex="1" parent="3">
<mxGeometry x="55.97" y="207" width="210" height="61" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-39" target="p1ojiiCee6jBFZuR8EvP-45">
<mxGeometry relative="1" as="geometry">
<mxPoint x="135" y="330" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-48" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-45" target="p1ojiiCee6jBFZuR8EvP-50">
<mxGeometry relative="1" as="geometry">
<mxPoint x="135" y="462.0000000000001" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-50" target="p1ojiiCee6jBFZuR8EvP-52">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-50" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>LBL_ACQUISITION</b><br></p><hr><p style="margin: 0px ; margin-left: 8px">COUNT_ANEMO ++</p><div>&nbsp;&nbsp; COUNT_ANEMO = COUNT_ANEMO /2<br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="3">
<mxGeometry x="50" y="287" width="220" height="63" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-57" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-52" target="p1ojiiCee6jBFZuR8EvP-45">
<mxGeometry x="0.009" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-52" value="t = ACQUISITION ?" style="rhombus;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;" vertex="1" parent="3">
<mxGeometry x="55.97" y="377" width="210" height="63" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-67" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-63" target="p1ojiiCee6jBFZuR8EvP-65">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-71" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-63" target="p1ojiiCee6jBFZuR8EvP-70">
<mxGeometry x="-0.1663" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-63" value="COUNT_ANEMO &gt; GUTS" style="rhombus;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;" vertex="1" parent="3">
<mxGeometry x="55.97" y="459" width="210" height="63" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-64" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-52" target="p1ojiiCee6jBFZuR8EvP-63">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-65" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>LBL_GUTS</b><br></p><hr><p style="margin: 0px ; margin-left: 8px">GUTS = COUNT_ANEMO<br></p>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="3">
<mxGeometry x="82.97" y="537" width="155" height="50" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-69" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-65" target="p1ojiiCee6jBFZuR8EvP-70">
<mxGeometry relative="1" as="geometry">
<mxPoint x="137.5" y="650" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-74" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontColor=#000000;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-70" target="p1ojiiCee6jBFZuR8EvP-73">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-70" value="<div>NB_ACQ ++</div><div>WINDSPD = + COUNT_ANEMO<br></div><div><br></div>" style="html=1;" vertex="1" parent="3">
<mxGeometry x="40.97" y="607" width="240" height="50" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-73" value="t = TIME_TO_SLEEP ?" style="rhombus;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;" vertex="1" parent="3">
<mxGeometry x="55.97" y="677" width="210" height="63" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-75" value="NO" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;fontColor=#000000;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="3" source="p1ojiiCee6jBFZuR8EvP-73" target="p1ojiiCee6jBFZuR8EvP-39">
<mxGeometry x="-0.9346" relative="1" as="geometry">
<mxPoint x="14.969999999999999" y="188" as="targetPoint" />
<Array as="points">
<mxPoint x="15" y="709" />
<mxPoint x="15" y="161" />
</Array>
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="4" value="Main()" style="swimlane;whiteSpace=wrap" parent="1" vertex="1">
<mxGeometry x="570" y="23" width="490" height="780" as="geometry">
<mxRectangle x="570" y="23" width="110" height="23" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-85" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>Aneometre()</b></p><hr><div align="center"><b>WINDSPD</b> = WINDSPD / NB_ACQ</div><div align="center"><b>WINDSPD</b> = WINDSPD * M_PI * DIAMETER/(TIME_TO_SLEEP * 3.6)</div><div align="center"><b>GUTS </b>= GUTS * M_PI *DIAMETER/(TIME_TO_SLEEP*3.6)<br></div><div align="center"><b>NB_ACQ</b> = 0<br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="4">
<mxGeometry x="10" y="40" width="470" height="100" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-86" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>Sleep()</b></p><hr><div align="center"><b>deepsleep(</b>TIME_TO_SLEEP<b>) </b><br></div>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="4">
<mxGeometry x="10" y="207" width="470" height="49" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-87" value="<p style="margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline"><b>Send_Data()</b></p><hr>" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="4">
<mxGeometry x="10" y="147" width="470" height="49" as="geometry" />
</mxCell>
<mxCell id="p1ojiiCee6jBFZuR8EvP-78" value="Wake up !" style="edgeStyle=orthogonalEdgeStyle;rounded=0;jumpStyle=none;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontColor=#000000;" edge="1" parent="1" source="p1ojiiCee6jBFZuR8EvP-73">
<mxGeometry relative="1" as="geometry">
<mxPoint x="554.97" y="770" as="targetPoint" />
<Array as="points">
<mxPoint x="410.97" y="770" />
<mxPoint x="484.97" y="770" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>