2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: main.c,v 1.1.2.2 2009-05-02 10:00:35 zer0 Exp $
28 #include <aversive/error.h>
30 #include <vect_base.h>
34 #include <obstacle_avoidance.h>
40 /* log function, add a command to configure
42 void mylog(struct error * e, ...)
47 printf_P(PSTR("[%d]: E%d "), e->severity, e->err_num);
48 vfprintf_P(stdout, e->text, ap);
49 printf_P(PSTR("\r\n"));
54 int main(int argc, char** argv)
59 error_register_emerg(mylog);
60 error_register_error(mylog);
61 error_register_warning(mylog);
62 error_register_notice(mylog);
63 error_register_debug(mylog);
67 oa_start_end_points(30, 30, 194, 149);
71 oa_poly_set_point(pol, PTX-SIZE, PTY-SIZE, 0);
72 oa_poly_set_point(pol, PTX+SIZE, PTY-SIZE, 1);
73 oa_poly_set_point(pol, PTX+SIZE, PTY+SIZE, 2);
74 oa_poly_set_point(pol, PTX-SIZE, PTY+SIZE, 3);