summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/guybrush/bottom_clamp.c
diff options
context:
space:
mode:
authorJulien Balleyguier2012-05-13 12:45:50 +0200
committerJulien Balleyguier2012-05-13 13:25:26 +0200
commit024d0b04e63c0a60ec8d0e7a11f9414f5abfc7ec (patch)
tree7b97c6070e377a01ae81a679699eefae492b0238 /digital/io-hub/src/guybrush/bottom_clamp.c
parent44c97e60087faedaa41e406921171d6b5f6822c1 (diff)
digital/io-hub/src/guybrush/bottom_clamp.c : adding demo/normal mode
Diffstat (limited to 'digital/io-hub/src/guybrush/bottom_clamp.c')
-rw-r--r--digital/io-hub/src/guybrush/bottom_clamp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/digital/io-hub/src/guybrush/bottom_clamp.c b/digital/io-hub/src/guybrush/bottom_clamp.c
index 1d260b3c..1e6f2d4c 100644
--- a/digital/io-hub/src/guybrush/bottom_clamp.c
+++ b/digital/io-hub/src/guybrush/bottom_clamp.c
@@ -236,10 +236,15 @@ FSM_TRANS (CLAMP_INIT_FIND_0, lower_clamp_rotation_success, CLAMP_INIT_HIDE_CLAM
return FSM_NEXT (CLAMP_INIT_FIND_0, lower_clamp_rotation_success);
}
-FSM_TRANS (CLAMP_INIT_HIDE_CLAMP, lower_clamp_rotation_success, CLAMP_INIT_READY)
+FSM_TRANS (CLAMP_INIT_HIDE_CLAMP, lower_clamp_rotation_success,
+ normal_start,CLAMP_INIT_READY,
+ demo_start,CLAMP_GOING_IDLE)
{
- /*Nothing to do,just waiting for the clamp to be hidden*/
- return FSM_NEXT (CLAMP_INIT_HIDE_CLAMP, lower_clamp_rotation_success);
+ /*Looking if we are in demo mode or normal mode*/
+ if (IO_GET(CONTACT_STRAT))
+ return FSM_NEXT (CLAMP_INIT_HIDE_CLAMP,lower_clamp_rotation_success,normal_start);
+ else
+ return FSM_NEXT (CLAMP_INIT_HIDE_CLAMP,lower_clamp_rotation_success,demo_start);
}