summaryrefslogtreecommitdiffhomepage
path: root/digital/io
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-22 21:57:49 +0200
committerNicolas Schodet2008-04-22 21:57:49 +0200
commit57aa8754858a40a98348071e233f578c7a64d430 (patch)
treef9f57cf479019991b2b9a94bc167ffb45aeb0b29 /digital/io
parenta07b9473d9c95904a9f0ff9e6bb5f9431d8735d2 (diff)
* digital/io/src:
- fixed bad macros.
Diffstat (limited to 'digital/io')
-rw-r--r--digital/io/src/playground.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/digital/io/src/playground.h b/digital/io/src/playground.h
index 95f7aad3..779b22c8 100644
--- a/digital/io/src/playground.h
+++ b/digital/io/src/playground.h
@@ -51,14 +51,14 @@
* value for on the X axis depending on the color.
*/
#define PG_X_VALUE_COMPUTING(x) \
- (bot_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) \
- (bot_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.