*/
FSM_STATE(main_init)
{
- pthread_t thid;
-
/* start event ocurred */
switch (FSM_EVENT) {
-#ifndef WAIT_FOR_START
case EV_ENTRY:
- /* init map and shared memory if required */
- ShmapInit(1);
- /* starting position of the robot */
- robot_set_act_pos_trans(ROBOT_WIDTH_M/2,
-#endif
++ robot_set_est_pos_trans(ROBOT_WIDTH_M/2,
+ PLAYGROUND_HEIGHT_M - ROBOT_AXIS_TO_BACK_M,
+ DEG2RAD(135));
- /* waste counter */
+ FSM_TRANSITION(wait_for_start);
+ break;
+ default: break;
+ }
+}
+
+FSM_STATE(wait_for_start)
+{
+ pthread_t thid;
+
+ switch (FSM_EVENT) {
+#ifdef WAIT_FOR_START
case EV_START:
/* start competition timer */
pthread_create(&thid, NULL, wait_for_end, NULL);