From 024d0b04e63c0a60ec8d0e7a11f9414f5abfc7ec Mon Sep 17 00:00:00 2001 From: Julien Balleyguier Date: Sun, 13 May 2012 12:45:50 +0200 Subject: digital/io-hub/src/guybrush/bottom_clamp.c : adding demo/normal mode --- digital/io-hub/src/guybrush/bottom_clamp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'digital') 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); } -- cgit v1.2.3