]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Move start state enum to can_ids_def file.
authorMichal Vokac <vokac.m@gmail.com>
Fri, 25 Nov 2011 09:56:38 +0000 (10:56 +0100)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 25 Nov 2011 09:56:38 +0000 (10:56 +0100)
Now start states are common for lpc boards and other applications.
EB board now sends exact start states in robot_cmd CAN message.
ORTE robot_cmd type changed from boolean to char - now it can handle many different states.

src/common/can_msg_def.h
src/robofsm/robot.h
src/types/robottype.idl

index ca10a5f285f9be4915b57f03e5d4c3ac87147059..22d347d0ae8593297c4dbb4047a0cbee2c6b5d71 100644 (file)
 #define CAN_PWR_BATT_LOW        0x20
 #define CAN_PWR_BATT_CRITICAL   0x40
 
+enum robot_start_state {
+        POWER_ON = 0,
+        START_PLUGGED_IN = 1,
+        COMPETITION_STARTED = 2,
+};
+
 #endif
index 8c99357964b5426cc86c75000ae6d606eab5234d..704e533597c4d91ecffd8b47c37f4f6783e8117d 100644 (file)
@@ -33,12 +33,6 @@ enum team_color {
        YELLOW
 };
 
-enum robot_start_state {
-       POWER_ON = 0,
-       START_PLUGGED_IN,
-       COMPETITION_STARTED,
-};
-
 /**
  * FSM
  */
index ef4cd5bb52ed21bcd8ca528daf1cc038d9172af0..6bdefa2a8b21d3f6a3a4159d369a054b827c4be4 100644 (file)
@@ -60,7 +60,7 @@ struct pwr_alert {
 };
 
 struct robot_cmd {
-       boolean start_condition;
+       char start_condition;
 };
 
 struct robot_bumpers {