-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseqeuence_diagram.puml
37 lines (31 loc) · 955 Bytes
/
seqeuence_diagram.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
@startuml
actor User
participant Main
participant "Push Button" as Button
participant "Timer (TIM5, TIM6, TIM7)" as Timer
participant LED
User -> Main: Starts Main Loop
loop while (1)
Main -> Button: handle_button_press()
alt Button Pressed
Main -> Timer: reset_timer(TIM5, delay = 2000ms)
Main -> Timer: reset_timer(TIM6, delay = 3000ms)
Main -> Timer: reset_timer(TIM7, delay = 4000ms)
end
alt TIM5 Timeout and LED On Condition
Timer -> LED: turn_on_led()
else TIM5 Timeout but LED Off Condition
Timer -> LED: turn_off_led()
end
alt TIM6 Timeout and LED On Condition
Timer -> LED: turn_on_led()
else TIM6 Timeout but LED Off Condition
Timer -> LED: turn_off_led()
end
alt TIM7 Timeout and LED On Condition
Timer -> LED: turn_on_led()
else TIM7 Timeout but LED Off Condition
Timer -> LED: turn_off_led()
end
end
@enduml