summaryrefslogtreecommitdiff
path: root/digital/io/src/playground.h
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-14 12:06:01 +0200
committerJérémy Dufour2008-04-14 12:06:01 +0200
commitd3c8bf5e81f46d66ff0badcbcbf20a3d828a30eb (patch)
treef66be160813127528352eeed837d223d6f520fe4 /digital/io/src/playground.h
parent7a7c0bb8b26353b2e754b4eaa79125aed33b0279 (diff)
* 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.
Diffstat (limited to 'digital/io/src/playground.h')
-rw-r--r--digital/io/src/playground.h17
1 files changed, 9 insertions, 8 deletions
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
@@ -47,24 +47,18 @@
#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