From d3c8bf5e81f46d66ff0badcbcbf20a3d828a30eb Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 14 Apr 2008 12:06:01 +0200 Subject: * digital/io/src * build - add dependency of fsm.h for main.c (for bootstrap) ; - ensure it is building for host target. * get samples FSM - remove unneeded fields in the getsamples structures ; - rename it to be more 'private' (to prevent declaring the same one) ; * top FSM - rewrite it ; - still missing some parts to implement. * general - manage color of the bot ; - initialize the switch module in the main_init ; - add position of the gutter. --- digital/io/src/playground.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'digital/io/src/playground.h') diff --git a/digital/io/src/playground.h b/digital/io/src/playground.h index b3e862d8..992425ce 100644 --- a/digital/io/src/playground.h +++ b/digital/io/src/playground.h @@ -46,25 +46,19 @@ */ #define PG_HEIGHT 2100 -/** - * Our color. - * XXX our_color = 1 = bleu, 0 = rouge - */ -extern uint8_t our_color; - /** * Considering there is a symmetry axis on X, this macro will compute the * value for on the X axis depending on the color. */ #define PG_X_VALUE_COMPUTING(x) \ - (our_color ? x : PG_WIDTH - x) + (bot_color ? x : PG_WIDTH - x) /** * Considering there is a symmetry axis on X, this macro will compute the * value of the angle depending on the color. */ #define PG_A_VALUE_COMPUTING(a) \ - (our_color ? a : (a + BOT_ANGLE_DEGREE * 180)) + (bot_color ? a : (a + BOT_ANGLE_DEGREE * 180)) /** * The position where to reset the bot when it starts, depending on the color. @@ -108,4 +102,11 @@ extern uint8_t our_color; #define PG_DISTRIBUTOR_SAMPLE_OUR_Y (PG_HEIGHT - PG_DISTANCE_DISTRIBUTOR) #define PG_DISTRIBUTOR_SAMPLE_OUR_A (BOT_ANGLE_DEGREE * 270) +/** + * The position of the gutter. + */ +#define PG_GUTTER_X (PG_X_VALUE_COMPUTING (2250)) +#define PG_GUTTER_Y (100) +#define PG_GUTTER_A (BOT_ANGLE_DEGREE * 90) + #endif // playground_h -- cgit v1.2.3