From 388a90600023cca7d7b28702fa4cc75ed5074123 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Sun, 16 Mar 2008 23:07:49 +0100 Subject: Try to fill the ia functions. --- digital/io/src/ia.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) (limited to 'digital/io/src/ia.h') diff --git a/digital/io/src/ia.h b/digital/io/src/ia.h index 28f5257b..7ed9a571 100644 --- a/digital/io/src/ia.h +++ b/digital/io/src/ia.h @@ -24,6 +24,44 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * }}} */ +#include "asserv.h" + +#define TABLE_MAX_Y 3000 +#define TABLE_MAX_X 2100 + +#define DISTRIBUTOR_SAMPLES_Y 2100 + +#define DISTRIBUTOR_SAMPLES_BLUE_X 700 +#define DISTRIBUTOR_SAMPLES_RED_X 2300 + +#define DISTRIBUTOR_ICE_Y 1350 + +#define ASSERV_ARM_ROTATION_INIT 0 +#define ASSERV_ARM_ROTATION_FULL 5000 +#define ASSERV_ARM_ROTATION_THIRD (ASSERV_ARM_ROTATION_FULL / 3) + +#define ASSERV_ARM_SPEED_FULL 100 +#define ASSERV_ARM_SPEED_HALF (ASSERV_ARM_SPEED_FULL / 2) + +struct ia_t +{ + /* Bool status of the previous sequence loaded. + * If the previous was the sequence ISISI the next one shall be SISIS (S = + * sample, I = ice). + * false = ISISI. + * true = SISIS. + */ + bool sequence; + + /* Bool status indicating our ice distributor status. */ + bool ice_status_our; +}; + + +/** Initialize the IA. + */ +void +ia_init (void); /** Load balls procedure from a distributor. * @@ -39,7 +77,7 @@ * \param balls_nb the quantity of ball to load. */ void -ia_load_balls (uint8_t balls_nb); +ia_load_samples (uint8_t balls_nb); /** Get samples procedure. Request the robot to go and get some sample of the * team color or ice samples. @@ -53,8 +91,21 @@ ia_load_balls (uint8_t balls_nb); * * See trunk/digital/io/doc/getSamples.png and * trunk/digital/io/doc/loadballs.png (use make to get the png files). + * + * \param blue the team color true if the robot is in the blue team. */ void -ia_get_samples (void); +ia_get_samples (bool blue); + +/** Get ice. + */ +void +ia_get_ice (void); + +/** Depose the samples in the gutter. + */ +void +ia_depose_samples (void); + #endif /* ia_h */ -- cgit v1.2.3