summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/ai_move_cb.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/ai_move_cb.c')
-rw-r--r--digital/io/src/ai_move_cb.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/digital/io/src/ai_move_cb.c b/digital/io/src/ai_move_cb.c
index 5fc70653..69a46a3c 100644
--- a/digital/io/src/ai_move_cb.c
+++ b/digital/io/src/ai_move_cb.c
@@ -248,6 +248,30 @@ ai__MOVE_ROTATING__bot_move_succeed (void)
}
/*
+ * MOVE_ROTATING =bot_move_failed=>
+ * => MOVE_MOVING
+ * move to next position.
+ */
+fsm_branch_t
+ai__MOVE_ROTATING__bot_move_failed (void)
+{
+ ai__MOVE_ROTATING__bot_move_succeed ();
+ return ai_next (MOVE_ROTATING, bot_move_failed);
+}
+
+/*
+ * MOVE_ROTATING =state_timeout=>
+ * => MOVE_MOVING
+ * move to next position.
+ */
+fsm_branch_t
+ai__MOVE_ROTATING__state_timeout (void)
+{
+ ai__MOVE_ROTATING__bot_move_succeed ();
+ return ai_next (MOVE_ROTATING, state_timeout);
+}
+
+/*
* MOVE_ROTATING =loader_errored=>
* => MOVE_LOADER_UNBLOCKING_UPING
* move backward
@@ -319,6 +343,19 @@ ai__MOVE_MOVING__bot_move_failed (void)
}
/*
+ * MOVE_MOVING =state_timeout=>
+ * => MOVE_MOVING_BACKWARD_TO_TURN_FREELY
+ * reset final_move.
+ * move backward to turn freely.
+ */
+fsm_branch_t
+ai__MOVE_MOVING__state_timeout (void)
+{
+ ai__MOVE_MOVING__bot_move_failed ();
+ return ai_next (MOVE_MOVING, state_timeout);
+}
+
+/*
* MOVE_MOVING =obstacle_in_front=>
* tryagain => MOVE_WAIT_FOR_CLEAR_PATH
* reset final_move.