From d6e33d938415c34aea406327ba2b10b4e7f976b7 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 28 Apr 2008 12:19:07 +0200 Subject: * digital/io/src - correct bitfield values when calling the get samples FSM (trap 0 is the garbage) and prefer to use the enum. --- digital/io/src/top_cb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'digital/io/src') diff --git a/digital/io/src/top_cb.c b/digital/io/src/top_cb.c index 6f98ec96..2e5fa5c5 100644 --- a/digital/io/src/top_cb.c +++ b/digital/io/src/top_cb.c @@ -40,6 +40,8 @@ #include "getsamples.h" /* getsamples_* */ #include "gutter.h" /* gutter_start */ +#include "io.h" + /** * When we need to tell the main loop we want to be alerted when the last * command sent to the asserv board has been acknowledged. @@ -146,12 +148,13 @@ top__GO_TO_OUR_ICE_DISTRIBUTOR__move_fsm_finished (void) if (top_fsm_loop_count_ == 0) { /* First time we try to get our ice, let's took two */ - bitfield = 0xA; + bitfield = _BV (middle_left_box) | _BV (middle_right_box); } else { /* Second time we try to get our ice, let's took only three */ - bitfield = 0x15; + bitfield = _BV (out_left_box) | _BV (middle_box) | _BV + (out_right_box); } getsamples_start (PG_DISTRIBUTOR_ICE_OUR_A, bitfield); return top_next (GO_TO_OUR_ICE_DISTRIBUTOR, move_fsm_finished); @@ -170,13 +173,14 @@ top__GO_TO_SAMPLE_DISTRIBUTOR__move_fsm_finished (void) if (top_fsm_loop_count_ == 0) { /* First time we try to get our samples, let's took three of them */ - bitfield = 0x15; + bitfield = _BV (out_left_box) | _BV (middle_box) | _BV + (out_right_box); } else { /* Second time we try to get our samples, let's took only two of them */ - bitfield = 0xA; + bitfield = _BV (middle_left_box) | _BV (middle_right_box); } getsamples_start (PG_DISTRIBUTOR_SAMPLE_OUR_A, bitfield); return top_next (GO_TO_SAMPLE_DISTRIBUTOR, move_fsm_finished); -- cgit v1.2.3