Revision 213
Updated recharging code.
main.c | ||
---|---|---|
2 | 2 |
#include <wireless.h> |
3 | 3 |
#include <wl_token_ring.h> |
4 | 4 |
|
5 |
int main(void)
|
|
5 |
int main(int argcc, char* argv)
|
|
6 | 6 |
{ |
7 |
if (argc < 2) |
|
8 |
return; |
|
9 |
int robot = atoi(argv[1]); |
|
7 | 10 |
dragonfly_init(ALL_ON); |
8 | 11 |
usb_puts("Start.\r\n"); |
9 | 12 |
wl_init(); |
10 | 13 |
usb_puts("Wireless initialized.\n"); |
11 |
wl_token_ring_register();
|
|
12 |
wl_token_ring_join();
|
|
13 |
while (1) |
|
14 |
wl_do(); |
|
14 |
wl_send_robot_to_robot_global_packet(3, 9, NULL, 0, robot, 0);
|
|
15 |
printf("Command sent to robot %i.\n", robot);
|
|
16 |
//while (1)
|
|
17 |
// wl_do();
|
|
15 | 18 |
} |
Also available in: Unified diff