Revision 769
Made recharge test more user-friendly
branches/autonomous_recharging/code/projects/libwireless/test/test.c | ||
---|---|---|
8 | 8 |
|
9 | 9 |
#include <time.h> |
10 | 10 |
|
11 |
void usage (void); |
|
12 |
|
|
11 | 13 |
int main(int argc, char** argv) |
12 | 14 |
{ |
15 |
if (argc != 3) { |
|
16 |
usage(); |
|
17 |
return -1; |
|
18 |
} |
|
13 | 19 |
char c = argv[1][0]; |
14 | 20 |
int robot = atoi(argv[2]); |
15 | 21 |
wl_set_com_port("/dev/ttyUSB0"); |
... | ... | |
29 | 35 |
return 0; |
30 | 36 |
} |
31 | 37 |
|
38 |
void usage (void) { |
|
39 |
printf("Usage: test [g|d] [robot]\n\tg sends charge\n\td sends depart\n\trobot is the ID of the desired robot\n"); |
|
40 |
} |
|
41 |
|
|
42 |
|
|
43 |
|
Also available in: Unified diff