summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-09 09:50:45 +0200
committerNicolas Schodet2013-05-09 09:50:45 +0200
commit16fcdb2ec558570850f7afd2a5b797f67a450842 (patch)
tree791b39118d2fd471b23798b60f9c3d8d4e930c94 /digital/io-hub/src
parenta00a678a0ffec752028d500b587c5b8a63c6705a (diff)
digital/io-hub/src/apbirthday: wait for slow candle arm undeploying
Diffstat (limited to 'digital/io-hub/src')
-rw-r--r--digital/io-hub/src/apbirthday/top.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/digital/io-hub/src/apbirthday/top.cc b/digital/io-hub/src/apbirthday/top.cc
index b8c04b94..b325d54e 100644
--- a/digital/io-hub/src/apbirthday/top.cc
+++ b/digital/io-hub/src/apbirthday/top.cc
@@ -297,6 +297,8 @@ ANGFSM_STATES (
TOP_CANDLES_LEAVE_TANGENT_MOVE,
// Candles: turn to leave, undeploy arm as soon as possible.
TOP_CANDLES_LEAVE_TURN,
+ // Candles: wait for slow undeploying.
+ TOP_CANDLES_LEAVE_UNDEPLOY,
// Candles: go away so that the robot is free to turn.
TOP_CANDLES_LEAVE_GO_AWAY,
// Plate: go to plate, normal move.
@@ -472,17 +474,21 @@ FSM_TRANS (TOP_CANDLES_LEAVE_TANGENT_MOVE, robot_move_failure,
}
FSM_TRANS (TOP_CANDLES_LEAVE_TURN, robot_move_success,
- TOP_CANDLES_LEAVE_GO_AWAY)
+ TOP_CANDLES_LEAVE_UNDEPLOY)
{
// TODO: undeploy earlier, by computing arm end position.
ANGFSM_HANDLE (AI, ai_candle_undeploy);
- robot->asserv.move_distance (BOT_SIZE_RADIUS - BOT_SIZE_SIDE);
}
FSM_TRANS (TOP_CANDLES_LEAVE_TURN, robot_move_failure,
- TOP_CANDLES_LEAVE_GO_AWAY)
+ TOP_CANDLES_LEAVE_UNDEPLOY)
{
ANGFSM_HANDLE (AI, ai_candle_undeploy);
+}
+
+FSM_TRANS (TOP_CANDLES_LEAVE_UNDEPLOY, ai_candle_success,
+ TOP_CANDLES_LEAVE_GO_AWAY)
+{
robot->asserv.move_distance (BOT_SIZE_RADIUS - BOT_SIZE_SIDE);
}