From d00e50a990ad1dda71fcd0902056b42d53f82089 Mon Sep 17 00:00:00 2001 From: Jérôme Jutteau Date: Tue, 31 May 2011 18:22:33 +0200 Subject: digital/io-hub: fixed some logistic cases --- digital/io-hub/src/robospierre/logistic.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'digital/io-hub/src/robospierre/logistic.c') diff --git a/digital/io-hub/src/robospierre/logistic.c b/digital/io-hub/src/robospierre/logistic.c index fc21823c..d2abbb92 100644 --- a/digital/io-hub/src/robospierre/logistic.c +++ b/digital/io-hub/src/robospierre/logistic.c @@ -268,10 +268,6 @@ logistic_make_tower () e, _, e, _, D, LEFT, 0); - LOGISTIC_CASE (P, h, - e, _, e, - _, D, LEFT, 0); - LOGISTIC_CASE (_, h, e, _, e, P, D, LEFT, 0); @@ -322,7 +318,7 @@ logistic_make_unload () LOGISTIC_CASE (_, _, _, P, e, - e, D, LEFT, 0); + _, D, LEFT, 0); LOGISTIC_CASE (_, _, e, P, _, @@ -332,10 +328,22 @@ logistic_make_unload () static void logisitic_make_switches () { + LOGISTIC_CASE (_, P, + _, D, e, + _, _, LEFT, 0); + + LOGISTIC_CASE (P, _, + e, D, _, + _, _, LEFT, 0); + LOGISTIC_CASE (_, _, e, D, _, P, _, LEFT, 0); + LOGISTIC_CASE (_, _, + _, D, e, + _, P, LEFT, 0); + LOGISTIC_CASE (_, D, e, p, e, P, _, LEFT, 0); @@ -348,13 +356,13 @@ logisitic_make_switches () e, _, _, H, _, RIGHT, 0); - LOGISTIC_CASE (h, e, + LOGISTIC_CASE (h, _, e, _, e, - D, P, LEFT, 0); + D, P, RIGHT, 0); LOGISTIC_CASE (h, P, e, _, e, - D, P, LEFT, 0); + D, _, RIGHT, 0); } /** Examine current state and take a decision. */ -- cgit v1.2.3