From 0b7b203b4d6cc0e8efaadee8c1ad051276d0b3c8 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 10 May 2010 23:55:18 +0200 Subject: digital/io/src: move clamp all the way up --- digital/io/src/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'digital/io/src/main.c') diff --git a/digital/io/src/main.c b/digital/io/src/main.c index 8ad7c533..fdd98355 100644 --- a/digital/io/src/main.c +++ b/digital/io/src/main.c @@ -153,6 +153,10 @@ main_event_to_fsm (void) if (motorm0_status == success && motorm1_status == success) FSM_HANDLE_EVENT (&ai_fsm, AI_EVENT_clamp_succeed); + /* Check positions. */ + if (asserv_get_motor0_position () > BOT_ELEVATOR_UNLOAD_STEP) + FSM_HANDLE_EVENT (&ai_fsm, AI_EVENT_elevator_unload_position); + /* Contacts. */ if (!IO_GET (CONTACT_BUMPER0) || !IO_GET (CONTACT_BUMPER1)) FSM_HANDLE_EVENT (&ai_fsm, AI_EVENT_loader_element); -- cgit v1.2.3