beacon_tsop
[aversive.git] / projects / microb2010 / tests / test_board2008 / commands.c
1 /*
2  *  Copyright Droids Corporation (2009)
3  * 
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.
8  *
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.
13  *
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
17  *
18  *  Revision : $Id: commands.c,v 1.7 2009-04-24 19:30:41 zer0 Exp $
19  *
20  *  Olivier MATZ <zer0@droids-corp.org> 
21  */
22
23 #include <stdlib.h>
24 #include <aversive/pgmspace.h>
25 #include <parse.h>
26
27 /* commands_gen.c */
28 extern parse_pgm_inst_t cmd_reset;
29 extern parse_pgm_inst_t cmd_bootloader;
30 extern parse_pgm_inst_t cmd_encoders;
31 extern parse_pgm_inst_t cmd_pwm;
32 extern parse_pgm_inst_t cmd_adc;
33 extern parse_pgm_inst_t cmd_sensor;
34 extern parse_pgm_inst_t cmd_log;
35 extern parse_pgm_inst_t cmd_log_show;
36 extern parse_pgm_inst_t cmd_log_type;
37 extern parse_pgm_inst_t cmd_stack_space;
38 extern parse_pgm_inst_t cmd_scheduler;
39
40 /* commands_ax12.c */
41 extern parse_pgm_inst_t cmd_baudrate;
42 extern parse_pgm_inst_t cmd_uint16_read;
43 extern parse_pgm_inst_t cmd_uint16_write;
44 extern parse_pgm_inst_t cmd_uint8_read;
45 extern parse_pgm_inst_t cmd_uint8_write;
46
47 /* commands_cs.c */
48 extern parse_pgm_inst_t cmd_gain;
49 extern parse_pgm_inst_t cmd_gain_show;
50 extern parse_pgm_inst_t cmd_speed;
51 extern parse_pgm_inst_t cmd_speed_show;
52 extern parse_pgm_inst_t cmd_derivate_filter;
53 extern parse_pgm_inst_t cmd_derivate_filter_show;
54 extern parse_pgm_inst_t cmd_consign;
55 extern parse_pgm_inst_t cmd_maximum;
56 extern parse_pgm_inst_t cmd_maximum_show;
57 extern parse_pgm_inst_t cmd_quadramp;
58 extern parse_pgm_inst_t cmd_quadramp_show;
59 extern parse_pgm_inst_t cmd_cs_status;
60 extern parse_pgm_inst_t cmd_blocking_i;
61 extern parse_pgm_inst_t cmd_blocking_i_show;
62
63 /* commands_mainboard.c */
64 extern parse_pgm_inst_t cmd_event;
65 extern parse_pgm_inst_t cmd_spi_test;
66 extern parse_pgm_inst_t cmd_opponent;
67 extern parse_pgm_inst_t cmd_opponent_set;
68 extern parse_pgm_inst_t cmd_start;
69 extern parse_pgm_inst_t cmd_interact;
70 extern parse_pgm_inst_t cmd_color;
71 extern parse_pgm_inst_t cmd_rs;
72 extern parse_pgm_inst_t cmd_i2cdebug;
73 extern parse_pgm_inst_t cmd_mechboard_show;
74 extern parse_pgm_inst_t cmd_mechboard_setmode1;
75 extern parse_pgm_inst_t cmd_mechboard_setmode2;
76 extern parse_pgm_inst_t cmd_mechboard_setmode3;
77 extern parse_pgm_inst_t cmd_mechboard_setmode4;
78 extern parse_pgm_inst_t cmd_mechboard_setmode5;
79 extern parse_pgm_inst_t cmd_pickup_wheels;
80 extern parse_pgm_inst_t cmd_beacon_start;
81 extern parse_pgm_inst_t cmd_pump_current;
82 extern parse_pgm_inst_t cmd_build_test;
83 extern parse_pgm_inst_t cmd_column_test;
84 extern parse_pgm_inst_t cmd_column_test2;
85 extern parse_pgm_inst_t cmd_lintel_test;
86 extern parse_pgm_inst_t cmd_pickup_test;
87 extern parse_pgm_inst_t cmd_scan_test;
88 extern parse_pgm_inst_t cmd_scan_test2;
89 extern parse_pgm_inst_t cmd_time_monitor;
90 extern parse_pgm_inst_t cmd_scanner;
91 extern parse_pgm_inst_t cmd_build_z1;
92 #ifdef TEST_BEACON
93 extern parse_pgm_inst_t cmd_beacon_opp_dump;
94 #endif
95 extern parse_pgm_inst_t cmd_test;
96 extern parse_pgm_inst_t cmd_fessor;
97 extern parse_pgm_inst_t cmd_fessor_params;
98 extern parse_pgm_inst_t cmd_fessor_params_show;
99
100
101 extern parse_pgm_inst_t cmd_elevator;
102 extern parse_pgm_inst_t cmd_elevator_params;
103 extern parse_pgm_inst_t cmd_elevator_params_show;
104
105 /* commands_traj.c */
106 extern parse_pgm_inst_t cmd_traj_speed;
107 extern parse_pgm_inst_t cmd_traj_speed_show;
108 extern parse_pgm_inst_t cmd_trajectory;
109 extern parse_pgm_inst_t cmd_trajectory_show;
110 extern parse_pgm_inst_t cmd_rs_gains;
111 extern parse_pgm_inst_t cmd_rs_gains_show;
112 extern parse_pgm_inst_t cmd_track;
113 extern parse_pgm_inst_t cmd_track_show;
114 extern parse_pgm_inst_t cmd_pt_list;
115 extern parse_pgm_inst_t cmd_pt_list_append;
116 extern parse_pgm_inst_t cmd_pt_list_del;
117 extern parse_pgm_inst_t cmd_pt_list_show;
118 extern parse_pgm_inst_t cmd_goto1;
119 extern parse_pgm_inst_t cmd_goto2;
120 extern parse_pgm_inst_t cmd_goto3;
121 extern parse_pgm_inst_t cmd_position;
122 extern parse_pgm_inst_t cmd_position_set;
123 extern parse_pgm_inst_t cmd_strat_infos;
124 extern parse_pgm_inst_t cmd_strat_conf;
125 extern parse_pgm_inst_t cmd_strat_conf2;
126 extern parse_pgm_inst_t cmd_strat_conf3;
127 extern parse_pgm_inst_t cmd_strat_conf4;
128 extern parse_pgm_inst_t cmd_subtraj;
129
130 /* in progmem */
131 parse_pgm_ctx_t main_ctx[] = {
132
133         /* commands_gen.c */
134         (parse_pgm_inst_t *)&cmd_reset,
135         (parse_pgm_inst_t *)&cmd_bootloader,
136         (parse_pgm_inst_t *)&cmd_encoders,
137         (parse_pgm_inst_t *)&cmd_pwm,
138         (parse_pgm_inst_t *)&cmd_adc,
139         (parse_pgm_inst_t *)&cmd_sensor,
140         (parse_pgm_inst_t *)&cmd_log,
141         (parse_pgm_inst_t *)&cmd_log_show,
142         (parse_pgm_inst_t *)&cmd_log_type,
143         (parse_pgm_inst_t *)&cmd_stack_space,
144         (parse_pgm_inst_t *)&cmd_scheduler,
145
146         /* commands_cs.c */
147         (parse_pgm_inst_t *)&cmd_gain,
148         (parse_pgm_inst_t *)&cmd_gain_show,
149         (parse_pgm_inst_t *)&cmd_speed,
150         (parse_pgm_inst_t *)&cmd_speed_show,
151         (parse_pgm_inst_t *)&cmd_consign,
152         (parse_pgm_inst_t *)&cmd_derivate_filter,
153         (parse_pgm_inst_t *)&cmd_derivate_filter_show,
154         (parse_pgm_inst_t *)&cmd_maximum,
155         (parse_pgm_inst_t *)&cmd_maximum_show,
156         (parse_pgm_inst_t *)&cmd_quadramp,
157         (parse_pgm_inst_t *)&cmd_quadramp_show,
158         (parse_pgm_inst_t *)&cmd_cs_status,
159         (parse_pgm_inst_t *)&cmd_blocking_i,
160         (parse_pgm_inst_t *)&cmd_blocking_i_show,
161
162         /* commands_mainboard.c */
163         (parse_pgm_inst_t *)&cmd_event,
164         (parse_pgm_inst_t *)&cmd_interact,
165         (parse_pgm_inst_t *)&cmd_rs,
166         (parse_pgm_inst_t *)&cmd_fessor,
167         (parse_pgm_inst_t *)&cmd_fessor_params,
168         (parse_pgm_inst_t *)&cmd_fessor_params_show,
169         (parse_pgm_inst_t *)&cmd_elevator,
170         (parse_pgm_inst_t *)&cmd_elevator_params,
171         (parse_pgm_inst_t *)&cmd_elevator_params_show,
172         (parse_pgm_inst_t *)&cmd_test,
173
174         /* commands_traj.c */
175         (parse_pgm_inst_t *)&cmd_traj_speed,
176         (parse_pgm_inst_t *)&cmd_traj_speed_show,
177         (parse_pgm_inst_t *)&cmd_trajectory,
178         (parse_pgm_inst_t *)&cmd_trajectory_show,
179         (parse_pgm_inst_t *)&cmd_rs_gains,
180         (parse_pgm_inst_t *)&cmd_rs_gains_show,
181         (parse_pgm_inst_t *)&cmd_track,
182         (parse_pgm_inst_t *)&cmd_track_show,
183         (parse_pgm_inst_t *)&cmd_pt_list,
184         (parse_pgm_inst_t *)&cmd_pt_list_append,
185         (parse_pgm_inst_t *)&cmd_pt_list_del,
186         (parse_pgm_inst_t *)&cmd_pt_list_show,
187         (parse_pgm_inst_t *)&cmd_goto1,
188         (parse_pgm_inst_t *)&cmd_goto2,
189         (parse_pgm_inst_t *)&cmd_position,
190         (parse_pgm_inst_t *)&cmd_position_set,
191         NULL,
192 };