Beruflich Dokumente
Kultur Dokumente
End if
If ThisEvent is ES_TIMEOUT from disarming timer
Set NextState to Dead
Switch all LEDs off (strip+11)
Switch off Laser Pointer using controlLaser function
Post ExitingDisamingState to BlinkingLED and Servo2 modules with parameter
MISS_60S to show not disarmed
Start dead Timer (which lasts for 3 sec) which posts to DDM and Servo2
Send high signal to Ed
End if
If ThisEvent is TargetMiss
Set NextState to Dead
Switch all LEDs off (strip+11)
Switch off Laser Pointer using controlLaser function
Post ExitingDisamingState to BlinkingLED and Servo2 modules with parameter
MISS_60S to show not disarmed
Start dead Timer (which lasts for 3 sec) which posts to DDM and Servo2
Send high signal to Ed
End if
If ThisEvent is TargetHit
NumOfHits=NumOfHits+1;
If NumOfHits equal to 2
Set NextState to Disarmed
Switch off all 11 LEDs
Switch off Laser Pointer using controlLaser function
Start Joy LED strip
Start disarmed Timer (which lasts for 30 sec) which posts to DDM and
Servo2
Post ExitingDisamingState to BlinkingLED and Servo2 modules with
parameter HIT to show all targets hit successfully
Send low signal to Ed
End if
Else
Set NextState to Disarming
Switch off target LED (wire cut)
Send high signal to Ed
End else
End if
End Disarming block
CurrentState is NoPower
If ThisEvent is WheelRotationStarted
Set NextState to Disarming
Set NumOfHits to 0
Switch on all LEDs on hero A's side