-
Notifications
You must be signed in to change notification settings - Fork 0
/
fw_flow.puml
83 lines (70 loc) · 2.16 KB
/
fw_flow.puml
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
@startuml Firmware Flowchart
hide empty description
Sleep: D1 OFF
Sleep: DS1 Charging Status
Sleep: DS2 Water Detect Status
Sleep: Cell Modem OFF
state DataUpload {
Connect: D1 Solid Blue
Connect: DS1 Charging Status
Connect: DS2 Water Detect Status
Connect: Cell Modem ON
Transmit: D1 Blink Blue
Transmit: DS1 Charging Status
Transmit: DS2 Water Detect Status
Transmit: Cell Modem ON
}
state Ride {
state "Deployed/No GPS" as deployed_nogps
deployed_nogps: D1 Solid White
deployed_nogps: DS1 Charging Status
deployed_nogps: DS2 Water Detect Status
deployed_nogps: Cell Modem OFF
state "Deployed/GPS" as deployed_gps
deployed_gps: D1 Blink White
deployed_gps: DS1 Charging Status
deployed_gps: DS2 Water Detect Status
deployed_gps: Cell Modem OFF
}
state ChargeTask {
state "Charged Complete" as charge_complete
charge_complete: D1 OFF
charge_complete: DS1 Solid Green
charge_complete: DS2 Water Detect Status
charge_complete: Cell Modem OFF
Charging: D1 OFF
Charging: DS1 Blink Green
Charging: DS2 Water Detect Status
Charging: Cell Modem OFF
}
state "CLI" as CLI
CLI: D1 Solid Yellow
CLI: DS1 Charging Status
CLI: DS2 Water Detect Status
CLI: Cell Modem OFF
state choice1 <<choice>>
state choice2 <<choice>>
[*] -d-> Setup
Setup -d-> Sleep
Sleep -d-> Ride : Water Detected
deployed_nogps -u-> deployed_gps : GPS Lock
deployed_gps -d-> deployed_nogps : Lost GPS Lock
Ride -d-> choice2 : Out of water
choice2 -d-> Connect : Data to transmit
Connect -u-> Transmit : Connected
Transmit -u-> Sleep : Transmit Complete
Sleep -l-> choice1 : USB Connect
choice1 -d-> Connect : Data to transmit
choice1 -l-> ChargeTask : No data to transmit
Charging -d-> charge_complete : Charge Complete
ChargeTask --r--> CLI : "#CLI"
CLI -d--> Connect : Upload Data Command
CLI -d--> Ride : Deploy Command
CLI -l--> Sleep : Sleep Command/CLI timeout
choice2 -u-> Sleep : No data to transmit
DataUpload -u-> Sleep : Low Battery/No Connection
Ride -l-> Sleep : Low Battery
ChargeTask -r-> Sleep : USB Disconnect/~40 days elapsed
DataUpload -r-> Ride : Water Detected
Transmit -d-> Connect : Lost Connection
@enduml