git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change colors
[aversive.git]
/
projects
/
microb2010
/
tests
/
hostsim
/
strat_utils.c
diff --git
a/projects/microb2010/tests/hostsim/strat_utils.c
b/projects/microb2010/tests/hostsim/strat_utils.c
index
8fcecb2
..
6e1bef8
100644
(file)
--- a/
projects/microb2010/tests/hostsim/strat_utils.c
+++ b/
projects/microb2010/tests/hostsim/strat_utils.c
@@
-173,13
+173,13
@@
uint8_t robot_is_near_disc(void)
}
/* return 1 or 0 depending on which side of a line (y=cste) is the
}
/* 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);
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
if (posy > y)
return 1;
else
@@
-194,7
+194,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
}
/* 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;
uint8_t x_is_more_than(int16_t x)
{
int16_t posx;
@@
-258,10
+258,10
@@
uint8_t get_color(void)
/* get the color of the opponent robot */
uint8_t get_opponent_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
else
- return I2C_COLOR_
RED
;
+ return I2C_COLOR_
YELLOW
;
}
/* get the xy pos of the opponent robot */
}
/* get the xy pos of the opponent robot */
@@
-402,7
+402,7
@@
uint8_t wait_scan_done(uint16_t timeout)
uint8_t opponent_is_behind(void)
{
int8_t opp_there;
uint8_t opponent_is_behind(void)
{
int8_t opp_there;
- int16_t opp_d
, opp_a
;
+ int16_t opp_d
= 0, opp_a = 0
;
opp_there = get_opponent_da(&opp_d, &opp_a);
if (opp_there && (opp_a < 215 && opp_a > 145) && opp_d < 600)
opp_there = get_opponent_da(&opp_d, &opp_a);
if (opp_there && (opp_a < 215 && opp_a > 145) && opp_d < 600)