summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/guybrush/bottom_clamp.c
diff options
context:
space:
mode:
authorNicolas Schodet2012-05-17 01:50:12 +0200
committerNicolas Schodet2012-05-17 01:50:12 +0200
commit056a2a33b6e96445415e796b7dc845210140ec37 (patch)
treeeb329d12b406b4c3af4694bea1f485446e730a81 /digital/io-hub/src/guybrush/bottom_clamp.c
parentc28e9b1f3dad759fdb894970e94798b0b4221e81 (diff)
digital/io-hub/src/guybrush: change unblock event
Diffstat (limited to 'digital/io-hub/src/guybrush/bottom_clamp.c')
-rw-r--r--digital/io-hub/src/guybrush/bottom_clamp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/digital/io-hub/src/guybrush/bottom_clamp.c b/digital/io-hub/src/guybrush/bottom_clamp.c
index 1cff2440..737b0b11 100644
--- a/digital/io-hub/src/guybrush/bottom_clamp.c
+++ b/digital/io-hub/src/guybrush/bottom_clamp.c
@@ -160,6 +160,8 @@ FSM_EVENTS (
robot_is_back,
/* The clamp is blocked. We can try to unblock it*/
clamp_blocked,
+ /* Try to unblock clamp. */
+ clamp_unblock,
/* We tryed to unblock the clamp too many time. we can now say that the bottom clamp is out of order*/
clamp_is_dead
)
@@ -764,10 +766,10 @@ FSM_TRANS_TIMEOUT (CLAMP_BLOCKED,TIMEOUT_OPEN_CLAMPS,CLAMP_OPEN_BOTTOM_CLAMPS)
return FSM_NEXT_TIMEOUT (CLAMP_BLOCKED);
}
-FSM_TRANS (CLAMP_OPEN_BOTTOM_CLAMPS,robot_is_back, CLAMP_WAIT)
+FSM_TRANS (CLAMP_OPEN_BOTTOM_CLAMPS, clamp_unblock, CLAMP_WAIT)
{
mimot_move_motor0_absolute (mimot_get_motor0_position() - 16 * 250, MEDIUM_ROTATION);
- return FSM_NEXT (CLAMP_OPEN_BOTTOM_CLAMPS, robot_is_back);
+ return FSM_NEXT (CLAMP_OPEN_BOTTOM_CLAMPS, clamp_unblock);
}
FSM_TRANS (CLAMP_OPEN_BOTTOM_CLAMPS,clamp_is_dead, CLAMP_SHITTY_STATE)