X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fmainboard%2Fstrat_utils.c;h=708f08a27310fd9c18ff01b4436fdd8e0110417a;hp=b1bf942e4c3738a72e46baf88b7020b084c72d15;hb=4e7801883ed4076cb14b63a0571467747894c0f8;hpb=1714f4ee916fca95ce24120ea6e698237913f947 diff --git a/projects/microb2010/mainboard/strat_utils.c b/projects/microb2010/mainboard/strat_utils.c index b1bf942..708f08a 100644 --- a/projects/microb2010/mainboard/strat_utils.c +++ b/projects/microb2010/mainboard/strat_utils.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -171,13 +172,13 @@ uint8_t robot_is_in_area(int16_t margin) } /* return 1 or 0 depending on which side of a line (y=cste) is the - * robot. works in red or green color. */ + * robot. works in yellow or blue color. */ uint8_t y_is_more_than(int16_t y) { int16_t posy; posy = position_get_y_s16(&mainboard.pos); - if (mainboard.our_color == I2C_COLOR_RED) { + if (mainboard.our_color == I2C_COLOR_YELLOW) { if (posy > y) return 1; else @@ -192,7 +193,7 @@ uint8_t y_is_more_than(int16_t y) } /* return 1 or 0 depending on which side of a line (x=cste) is the - * robot. works in red or green color. */ + * robot. works in yellow or blue color. */ uint8_t x_is_more_than(int16_t x) { int16_t posx; @@ -256,10 +257,10 @@ uint8_t get_color(void) /* get the color of the opponent robot */ uint8_t get_opponent_color(void) { - if (mainboard.our_color == I2C_COLOR_RED) - return I2C_COLOR_GREEN; + if (mainboard.our_color == I2C_COLOR_YELLOW) + return I2C_COLOR_BLUE; else - return I2C_COLOR_RED; + return I2C_COLOR_YELLOW; } /* get the xy pos of the opponent robot */