From 5dda25337ca882196e2ffca31cced51055ec670c Mon Sep 17 00:00:00 2001 From: Jérôme Jutteau Date: Wed, 1 Jun 2011 14:27:57 +0200 Subject: ddigital/io-hub: fixed logistic switches when we are in the green zone --- digital/io-hub/src/robospierre/logistic.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/digital/io-hub/src/robospierre/logistic.c b/digital/io-hub/src/robospierre/logistic.c index 32b9fdb0..56767d57 100644 --- a/digital/io-hub/src/robospierre/logistic.c +++ b/digital/io-hub/src/robospierre/logistic.c @@ -348,21 +348,33 @@ logisitic_make_switches () e, p, e, P, _, LEFT, 0); - LOGISTIC_CASE (_, p, + LOGISTIC_CASE (_, a, e, p, e, P, D, LEFT, 0); LOGISTIC_CASE (D, _, e, _, _, H, _, RIGHT, 0); + + LOGISTIC_CASE (_, D, + _, _, e, + _, H, LEFT, 0); - LOGISTIC_CASE (h, _, + LOGISTIC_CASE (h, P, + e, _, e, + D, _, RIGHT, 0); + + LOGISTIC_CASE (h, e, e, _, e, D, P, RIGHT, 0); - LOGISTIC_CASE (h, P, + LOGISTIC_CASE (P, h, e, _, e, - D, _, RIGHT, 0); + _, D, LEFT, 0); + + LOGISTIC_CASE (e, h, + e, _, e, + P, D, LEFT, 0); } void @@ -421,7 +433,7 @@ logistic_init (void) ctx.clamp_pos_idle = ctx.collect_direction == DIRECTION_FORWARD ? CLAMP_SLOT_FRONT_MIDDLE : CLAMP_SLOT_BACK_MIDDLE; ctx.construct_possible = 0; - ctx.prepare = 1; + ctx.prepare = 0; ctx.ready = 0; ctx.need_prepare = 0; } -- cgit v1.2.3