00001 /* main.c<2> --- 00002 * 00003 * Filename: main.c<2> 00004 * Description: 00005 * Author: Bryce Himebaugh 00006 * Maintainer: 00007 * Created: Mon Oct 16 13:28:39 2006 00008 * Version: 00009 * Last-Updated: 00010 * By: 00011 * Update #: 0 00012 * Keywords: 00013 * Compatibility: 00014 * 00015 */ 00016 00017 /* Commentary: 00018 * 00019 * 00020 * 00021 */ 00022 00023 /* Change log: 00024 * 00025 * 00026 */ 00027 00028 /* This program is free software; you can redistribute it and/or modify 00029 * it under the terms of the GNU General Public License as published by 00030 * the Free Software Foundation; either version 2, or (at your option) 00031 * any later version. 00032 * 00033 * This program is distributed in the hope that it will be useful, 00034 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00035 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00036 * GNU General Public License for more details. 00037 * 00038 * You should have received a copy of the GNU General Public License 00039 * along with this program; see the file COPYING. If not, write to the 00040 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00041 * Boston, MA 02111-1307, USA. 00042 */ 00043 00044 /* Code: */ 00045 #include <stdio.h> 00046 #include <vcs_bsp/vcsbsp.h> 00047 #include "throttle.h" 00048 #include "gps.h" 00049 00050 int main(void) { 00051 int counter=0; 00052 char *data_ptr; 00053 00054 init_bsp(); 00055 write_throttle(0); 00056 init_gps(); 00057 00058 while(1) { 00059 if (tick_10mS) { 00060 tick_10mS=0; 00061 wiggler_p1(); 00062 evaluate_gps(); 00063 data_ptr=gps_get(); 00064 if (data_ptr) { 00065 gps_parse(data_ptr); 00066 } 00067 } 00068 if (counter++>100) { 00069 counter=0; 00070 } 00071 } 00072 return (0); 00073 } 00074 00075 00076 00077 /* if (tick_1mS) { */ 00078 /* if (percent_throttle++>100) { */ 00079 /* percent_throttle=0; */ 00080 /* } */ 00081 /* write_throttle(percent_throttle); */ 00082 /* tick_1mS=0; */ 00083 /* } */ 00084 00085 /* if (vspeed4_data_ready) { */ 00086 /* printf("%ld\n",vspeed4_period_uS); */ 00087 /* vspeed4_data_ready=0; */ 00088 /* } */ 00089 00090 /* while (!flush_uart0()); */ 00091 /* printf("%c",getchar_gps()); */ 00092 00093 00094 /* if (counter_1s++>=1000) { */ 00095 /* counter_1s=0; */ 00096 /* tick_1s=1; */ 00097 /* } */ 00098 /* if (tick_1s) { */ 00099 /* tick_1s=0; */ 00100 /* printf("Sending PGRMCE\n\r\n\r"); */ 00101 /* uprintf(&putchar_gps,"$PGRMCE\r\n"); */ 00102 /* while (!flush_uart1()); */ 00103 /* } */ 00104 00105 00106 00107 00108 00109 /* main.c<2> ends here */
1.3.9.1