2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
\r
4 * This program is free software; you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation; either version 2 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with this program; if not, write to the Free Software
\r
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
18 * Revision : $Id: main.c,v 1.9.4.5 2007-06-01 09:37:22 zer0 Exp $
\r
25 #include <aversive.h>
\r
26 #include <aversive/error.h>
\r
27 #include <aversive/wait.h>
\r
30 #include <scheduler.h>
\r
33 #include <quadramp.h>
\r
34 #include <control_system_manager.h>
\r
35 #include <trajectory_manager.h>
\r
36 #include <blocking_detection_manager.h>
\r
37 #include <robot_system.h>
\r
38 #include <position_manager.h>
\r
44 #include <clock_time.h>
\r
45 //#include <timer.h>
\r
46 #include <hostsim.h>
\r
49 #include "cmdline.h"
\r
50 #include "robotsim.h"
\r
52 #include "strat_base.h"
\r
55 struct genboard gen;
\r
56 struct mainboard mainboard;
\r
61 uart_register_rx_event(CMDLINE_UART, emergency);
\r
62 #ifndef HOST_VERSION
\r
63 fdevopen(uart0_dev_send, uart0_dev_recv);
\r
67 memset(&gen, 0, sizeof(gen));
\r
68 memset(&mainboard, 0, sizeof(mainboard));
\r
71 error_register_emerg(mylog);
\r
72 error_register_error(mylog);
\r
73 error_register_warning(mylog);
\r
74 error_register_notice(mylog);
\r
75 error_register_debug(mylog);
\r
77 #ifdef CONFIG_MODULE_TIMER
\r
90 time_init(TIME_PRIO);
\r
92 printf_P(PSTR("\r\n"));
\r
93 printf_P(PSTR("Respect et robustesse.\r\n"));
\r
95 mainboard.flags = DO_ENCODERS | DO_RS |
\r
96 DO_POS | DO_POWER | DO_BD | DO_CS;
\r
97 strat_reset_pos(1000, 1000, -90);
\r