From 8a2b063c5f1482bcc0e2576bfe178a6c21a9f166 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 14 May 2012 16:28:01 +0200 Subject: digital/io-hub/src/guybrush: add command to simulate catch requests --- digital/io-hub/src/guybrush/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/digital/io-hub/src/guybrush/main.c b/digital/io-hub/src/guybrush/main.c index b59594ea..80b378d8 100644 --- a/digital/io-hub/src/guybrush/main.c +++ b/digital/io-hub/src/guybrush/main.c @@ -327,6 +327,15 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) /* Simulate the robot_is_back command. */ fsm_queue_post_event (FSM_EVENT (AI, robot_is_back)); break; + case c ('c', 1): + /* Simulate clean_start (00), clean_catch (01), clean_load (02). */ + if (args[0] == 0) + fsm_queue_post_event (FSM_EVENT (AI, clean_start)); + else if (args[0] == 1) + fsm_queue_post_event (FSM_EVENT (AI, clean_catch)); + else + fsm_queue_post_event (FSM_EVENT (AI, clean_load)); + break; case c ('c',0): /* Simulate the coin detected command. */ fsm_queue_post_event (FSM_EVENT (AI, coin_detected)); -- cgit v1.2.3