summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-09 11:00:29 +0200
committerNicolas Schodet2013-05-09 11:02:33 +0200
commite97554f96efc436bf94ba0bb2492deca1fb76a97 (patch)
tree3dae41bb8a7c992b32e6ddc483d454880579b87b
parentad809cc9da22d92e6b83423b75d387d25c4c27de (diff)
digital/io-hub/src/apbirthday: if a plate is not seen, it may be there anyway
-rw-r--r--digital/io-hub/src/apbirthday/top.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/digital/io-hub/src/apbirthday/top.cc b/digital/io-hub/src/apbirthday/top.cc
index 8551a728..0950bcbe 100644
--- a/digital/io-hub/src/apbirthday/top.cc
+++ b/digital/io-hub/src/apbirthday/top.cc
@@ -536,10 +536,19 @@ FSM_TRANS (TOP_PLATE_GOTO, move_failure, TOP_DECISION)
robot->strat.failure ();
}
-FSM_TRANS (TOP_PLATE_APPROACH, move_success, TOP_DECISION)
+FSM_TRANS (TOP_PLATE_APPROACH, move_success,
+ leave, TOP_PLATE_LEAVE,
+ end, TOP_DECISION)
{
// TODO: no plate.
robot->strat.failure ();
+ if (top.plate.leave)
+ {
+ robot->move.start (top.plate.approaching_pos.v, Asserv::REVERT_OK);
+ return FSM_BRANCH (leave);
+ }
+ else
+ return FSM_BRANCH (end);
}
FSM_TRANS (TOP_PLATE_APPROACH, move_failure, TOP_DECISION)