summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/robospierre/logistic.c
diff options
context:
space:
mode:
authorJérôme Jutteau2011-06-01 14:27:57 +0200
committerJérôme Jutteau2011-06-01 17:29:40 +0200
commit5dda25337ca882196e2ffca31cced51055ec670c (patch)
tree495bb83ba7f9fcd7b5777e92775e2fd1fd75488c /digital/io-hub/src/robospierre/logistic.c
parent51b917f7994d6d53fde11263ba4da3470fd2a6c4 (diff)
ddigital/io-hub: fixed logistic switches when we are in the green zone
Diffstat (limited to 'digital/io-hub/src/robospierre/logistic.c')
-rw-r--r--digital/io-hub/src/robospierre/logistic.c22
1 files 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;
}