summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/getsamples_cb.c
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-20 16:04:44 +0200
committerJérémy Dufour2008-04-20 16:04:44 +0200
commit74e1ec414baeb80a37be3bc922a958aad60bb8e9 (patch)
tree29f8a2ef415bd8c59edceeecad5eb927ad9381ef /digital/io/src/getsamples_cb.c
parenta40c4ce480ae17fe63459865821eb713333e4536 (diff)
* digital/io/src
- use parameters to call the get samples FSM start function rather than a structure.
Diffstat (limited to 'digital/io/src/getsamples_cb.c')
-rw-r--r--digital/io/src/getsamples_cb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/digital/io/src/getsamples_cb.c b/digital/io/src/getsamples_cb.c
index 8f7abefb..e60bf2f8 100644
--- a/digital/io/src/getsamples_cb.c
+++ b/digital/io/src/getsamples_cb.c
@@ -34,9 +34,14 @@
#include "playground.h" /* PG_* */
/**
- * Get samples shared data.
+ * The approach angle to face the distributor.
*/
-extern struct getsamples_data_t getsamples_data_;
+extern int16_t approach_angle_;
+
+/**
+ * The samples bit field to collect.
+ */
+extern uint8_t sample_bitfield_;
/*
* FACE_DISTRIBUTOR =bot_move_succeed=>
@@ -89,7 +94,7 @@ fsm_branch_t
getsamples__TAKE_SAMPLES__arm_pass_noted_position (void)
{
/* More samples? */
- if (getsamples_data_.sample_bitfield)
+ if (sample_bitfield_)
{
/* Compute notifier */
uint16_t arm_current_position = asserv_get_arm_position ();
@@ -120,7 +125,7 @@ fsm_branch_t
getsamples__IDLE__start (void)
{
/* Face the distributor */
- asserv_goto_angle (getsamples_data_.approach_angle);
+ asserv_goto_angle (approach_angle_);
return getsamples_next (IDLE, start);
}