]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Main program is now called competition
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 24 Apr 2009 19:18:22 +0000 (21:18 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 24 Apr 2009 19:18:22 +0000 (21:18 +0200)
src/robofsm/Makefile.omk
src/robofsm/competition.cc [moved from src/robofsm/fsmmain.c with 97% similarity]
src/robofsm/main.cc [deleted file]

index 7494ac0d2ffbe471878d2a0c48f52d80d95f25ee..c0216a402a2679859c4840c645d9208c6e25a321 100644 (file)
@@ -7,8 +7,8 @@ default_CONFIG = CONFIG_LOCK_CHECKING=n HAVE_PRIO_INHERIT=y
 config_include_HEADERS = robot_config.h
 robot_config_DEFINES = CONFIG_LOCK_CHECKING HAVE_PRIO_INHERIT
 
-bin_PROGRAMS += robomain
-robomain_SOURCES = main.cc fsmmain.c
+bin_PROGRAMS += competition
+competition_SOURCES = competition.cc
 
 bin_PROGRAMS += homologation
 homologation_SOURCES = homologation.cc
similarity index 97%
rename from src/robofsm/fsmmain.c
rename to src/robofsm/competition.cc
index f82c3124b2c578a385f7ecbd90e68dcaca79addf..fc0b97a8b08bccfc08dc8e6c76d10ef42b4d50df 100644 (file)
@@ -660,3 +660,24 @@ FSM_STATE()
 }
 */
 
+
+int main()
+{
+       int rv;
+
+       rv = robot_init();
+       if (rv) error(1, errno, "robot_init() returned %d\n", rv);
+
+       robot.fsm.main.debug_states = 1;
+       robot.fsm.motion.debug_states = 1;
+       robot.fsm.act.debug_states = 1;
+
+       robot.fsm.main.state = &fsm_state_main_init;
+
+        rv = robot_start();
+       if (rv) error(1, errno, "robot_start() returned %d\n", rv);
+
+       robot_destroy();
+
+       return 0;
+}
diff --git a/src/robofsm/main.cc b/src/robofsm/main.cc
deleted file mode 100644 (file)
index 1da648b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <robot.h>
-#include <fsm.h>
-#include <string.h>
-#include "robodata.h"
-#include <error.h>
-
-int main()
-{
-       int rv;
-
-       rv = robot_init();
-       if (rv) error(1, errno, "robot_init() returned %d\n", rv);
-
-       robot.obstacle_avoidance_enabled = true;
-
-       robot.fsm.main.debug_states = 1;
-       robot.fsm.motion.debug_states = 1;
-       robot.fsm.act.debug_states = 1;
-
-       robot.fsm.main.state = &fsm_state_main_init;
-
-        rv = robot_start();
-       if (rv) error(1, errno, "robot_start() returned %d\n", rv);
-
-       robot_destroy();
-
-       return 0;
-}