From c5a6dd43df4a0557a1d624dabd9bccd46ba86f34 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 3 Jun 2011 13:42:03 +0200 Subject: digital/io-hub: I like green when strat switch selected --- digital/io-hub/src/robospierre/top.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'digital') diff --git a/digital/io-hub/src/robospierre/top.c b/digital/io-hub/src/robospierre/top.c index 595371f7..7ed145a2 100644 --- a/digital/io-hub/src/robospierre/top.c +++ b/digital/io-hub/src/robospierre/top.c @@ -23,6 +23,7 @@ * * }}} */ #include "common.h" +#include "io.h" #include "playground_2011.h" #include "asserv.h" @@ -34,6 +35,7 @@ #include "move.h" #include "chrono.h" #include "pawn_sensor.h" +#include "contact.h" /* * Here is the top FSM. This FSM is suppose to give life to the robot with an @@ -398,6 +400,8 @@ FSM_TRANS (TOP_DROP_DROPPING, clamp_drop_waiting, TOP_DROP_CLEARING) { if (ctx.target_element_id != 0xff) element_down (ctx.target_element_id, ELEMENT_TOWER); + if (!IO_GET (CONTACT_STRAT)) + element_i_like_green (); asserv_move_linearly (logistic_global.collect_direction == DIRECTION_FORWARD ? 150 : -150); return FSM_NEXT (TOP_DROP_DROPPING, clamp_drop_waiting); -- cgit v1.2.3