X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Ftests%2Ftest_board2008%2Fstrat_utils.c;h=4f510f27a0bb951b88c759eb9ad2b78c66a3703e;hp=edd795a2791d38e217e652687897f635ddf66934;hb=0abf8acb258a098ee79cbbdb71f284693489d678;hpb=5918edd6f4f713ef3c8b0b0020dd30a4fb8222ae diff --git a/projects/microb2010/tests/test_board2008/strat_utils.c b/projects/microb2010/tests/test_board2008/strat_utils.c index edd795a..4f510f2 100644 --- a/projects/microb2010/tests/test_board2008/strat_utils.c +++ b/projects/microb2010/tests/test_board2008/strat_utils.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -77,17 +77,17 @@ int16_t simple_modulo_360(int16_t a) return a; } -/** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] */ -double simple_modulo_2pi(double a) -{ - if (a < -M_PI) { - a += M_2PI; - } - else if (a > M_PI) { - a -= M_2PI; - } - return a; -} +/* /\** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] *\/ */ +/* double simple_modulo_2pi(double a) */ +/* { */ +/* if (a < -M_PI) { */ +/* a += M_2PI; */ +/* } */ +/* else if (a > M_PI) { */ +/* a -= M_2PI; */ +/* } */ +/* return a; */ +/* } */ /* return the distance to a point in the area */ int16_t angle_abs_to_rel(int16_t a_abs) @@ -182,13 +182,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 */ @@ -203,7 +203,7 @@ uint8_t robot_is_in_area(int16_t margin) /* } */ /* 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; @@ -267,10 +267,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 *\/ */