summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/apbirthday
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io-hub/src/apbirthday')
-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);
}