]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Team color
authorpetr <silhavik.p@gmail.com>
Tue, 8 May 2012 08:21:02 +0000 (10:21 +0200)
committerpetr <silhavik.p@gmail.com>
Tue, 8 May 2012 08:21:02 +0000 (10:21 +0200)
Change team colors for this year competition.

src/robofsm/movehelper.h
src/robofsm/robot.c
src/robofsm/robot.h

index 9eedcfa73346e652c640c6a236d4de4bde1b61ba..82391263bf608c7c89cea64a94742c21512ee9d2 100644 (file)
@@ -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;
index 57e690a8b1701e9890f5addb90254d41fc566c8d..724a9d5a43a5660fb17ed5e74e6268c69545c14e 100644 (file)
@@ -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));
index a0eee2e76ba6263edc7ece43b76c29d0ff0cce1b..8e0714486c3ab2be9a2b8e9225d6e8b3d46a00f1 100644 (file)
@@ -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 {