From 23bce6a75a17b9cd9d3f35a251baa1b0635697a4 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Sat, 3 May 2008 12:43:19 +0200 Subject: * digital/io/src - manage the event where the bot can be blocked (when moving) in the different FSM, by waiting and trying again ; - ensure we update the classifier (with the servos motor) even when the arm move in a state where it should not. --- digital/io/src/getsamples.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'digital/io/src/getsamples.c') diff --git a/digital/io/src/getsamples.c b/digital/io/src/getsamples.c index ead49ecc..c1a7dc60 100644 --- a/digital/io/src/getsamples.c +++ b/digital/io/src/getsamples.c @@ -35,11 +35,13 @@ struct getsamples_data_t getsamples_data_; /* Start the get samples FSM. */ void -getsamples_start (int16_t approach_angle, uint8_t sample_bitfield) +getsamples_start (int16_t approach_angle, uint8_t sample_bitfield, uint8_t + direction) { /* Set parameters */ getsamples_data_.approach_angle = approach_angle; getsamples_data_.sample_bitfield = sample_bitfield; + getsamples_data_.direction = direction; /* Remove unhandled traps */ getsamples_data_.sample_bitfield &= (_BV (trap_count) - 1) & ~_BV (garbage); -- cgit v1.2.3