From: petr Date: Tue, 8 May 2012 08:21:02 +0000 (+0200) Subject: Team color X-Git-Url: http://rtime.felk.cvut.cz/gitweb/eurobot/public.git/commitdiff_plain/1ff21080e54ec7236fe1f2d682eb3e4e24fe257a Team color Change team colors for this year competition. --- diff --git a/src/robofsm/movehelper.h b/src/robofsm/movehelper.h index 9eedcfa7..82391263 100644 --- a/src/robofsm/movehelper.h +++ b/src/robofsm/movehelper.h @@ -74,7 +74,7 @@ extern "C" { static inline double __trans_ang(double phi) { - if (robot.team_color == RED) { + if (robot.team_color == VIOLET) { return phi; } else { double a; @@ -88,7 +88,7 @@ static inline double __trans_ang(double phi) static inline struct move_target_heading __trans_heading(struct move_target_heading h) { - if (robot.team_color == RED) { + if (robot.team_color == VIOLET) { return h; } else { if (h.operation != TOP_DONT_TURN) { @@ -110,7 +110,7 @@ static inline struct move_target_heading __trans_heading(struct move_target_head static inline double __trans_x(double x) { - if (robot.team_color == RED) + if (robot.team_color == VIOLET) return x; else return PLAYGROUND_WIDTH_M - x; diff --git a/src/robofsm/robot.c b/src/robofsm/robot.c index 57e690a8..724a9d5a 100644 --- a/src/robofsm/robot.c +++ b/src/robofsm/robot.c @@ -128,12 +128,12 @@ int robot_init() robot.fsm.act.transition_callback = trans_callback; robot.fsm.motion.transition_callback = trans_callback; - robot.team_color = RED; + robot.team_color = VIOLET; - if (robot.team_color == RED) { - ul_loginf("We are RED!\n"); + if (robot.team_color == VIOLET) { + ul_loginf("We are VIOLET!\n"); } else { - ul_loginf("We are BLUE!\n"); + ul_loginf("We are RED!\n"); } robot_set_est_pos_trans(ROBOT_START_X_M, ROBOT_START_Y_M, DEG2RAD(ROBOT_START_ANGLE_DEG)); diff --git a/src/robofsm/robot.h b/src/robofsm/robot.h index a0eee2e7..8e071448 100644 --- a/src/robofsm/robot.h +++ b/src/robofsm/robot.h @@ -29,8 +29,8 @@ * Competition parameters */ enum team_color { - RED = 0, /* Coordinate transformation does not apply */ - BLUE /* Coordinate transformation applies (in *_trans() functions) */ + VIOLET = 0, /* Coordinate transformation does not apply */ + RED /* Coordinate transformation applies (in *_trans() functions) */ }; enum robot_start_state {