00001 /******************************************************************************* 00002 * 00003 * File Name: main.c 00004 * Project : SelfTest + Demo 00005 * 00006 * Description: 00007 * 00008 * Ver. Date Author Comments 00009 * ------- ---------- -------------- ------------------------------ 00010 * 1.00 14.08.2003 Jan Grewe build 00011 * 00012 * Copyright (c) 2003 DLR Robotics & Mechatronics 00013 *****************************************************************************/ 00014 /*************************************************************************** 00015 * * 00016 * This program is free software; you can redistribute it and/or modify * 00017 * it under the terms of the GNU General Public License as published by * 00018 * the Free Software Foundation; either version 2 of the License, or * 00019 * any later version. * 00020 ***************************************************************************/ 00021 #include "asuro.h" 00022 #include "SelfTest.h" 00023 #include "Demo.h" 00024 00025 int main (void) 00026 { 00027 // unsigned int i,data[2]; 00028 // unsigned char count = 0,flag = FALSE; 00029 Init(); 00030 /* 00031 for (i = 0; i < 0x1FFF; i++) 00032 { 00033 OdometrieData(data); 00034 if ((data[0] < 200) && (flag == TRUE)) 00035 { 00036 count ++; 00037 flag = FALSE; 00038 } 00039 if (data[0] >= 600) flag = TRUE; 00040 } 00041 if (count > 10) Demo(); 00042 */ 00043 while (1) 00044 { 00045 if (PollSwitch()) 00046 { 00047 while (PollSwitch()); 00048 Demo(); 00049 } 00050 SelfTest(); 00051 } 00052 return 0; 00053 }