Revision 714
Apparently wireless init finishes, but still no actual evidence of communication. Makefile updated to show which output it makes
branches/autonomous_recharging/code/projects/libwireless/bayboardTest/main.c | ||
---|---|---|
2 | 2 |
#include <wireless.h> |
3 | 3 |
#include <wl_token_ring.h> |
4 | 4 |
|
5 |
void test_bom_on (void) |
|
6 |
{ |
|
7 |
set_orb(0,200,0); |
|
8 |
} |
|
9 |
|
|
10 |
void test_bom_off(void) |
|
11 |
{ |
|
12 |
set_orb(0,0,0); |
|
13 |
} |
|
14 |
|
|
15 |
int test_nothing(void) |
|
16 |
{ |
|
17 |
return -1; |
|
18 |
} |
|
19 |
|
|
20 |
void do_nothing (void) { |
|
21 |
|
|
22 |
} |
|
23 |
|
|
5 | 24 |
int main(void) |
6 | 25 |
{ |
7 | 26 |
bayboard_init(ALL_ON); |
8 |
usb_puts("Start.\r\n"); |
|
27 |
usb_puts("reset\n"); |
|
28 |
set_orb(0,0,200); |
|
29 |
delay_ms(500); |
|
30 |
set_orb(0,0,0); |
|
31 |
usb_puts("Start?\r\n"); |
|
9 | 32 |
wl_init(); |
33 |
|
|
34 |
usb_puts("Attempting to set bom functions\r\n"); |
|
35 |
wl_token_ring_set_bom_functions(do_nothing, do_nothing, test_nothing); |
|
36 |
usb_puts("Attempting to register\r\n"); |
|
37 |
wl_token_ring_register(); |
|
38 |
usb_puts("Attempting to join\r\n"); |
|
39 |
if (wl_token_ring_join()) |
|
40 |
set_orb(200,0,0); |
|
41 |
else |
|
42 |
set_orb(0,200,0); |
|
43 |
|
|
10 | 44 |
usb_puts("Wireless initialized.\r\n"); |
11 |
//wl_init(); |
|
12 |
//usb_puts("Wireless initialized.\n"); |
|
13 |
//wl_send_robot_to_robot_global_packet(3, 9, NULL, 0, 51, 0); |
|
14 |
//printf("Command sent to robot %i.\n", 51); |
|
45 |
|
|
15 | 46 |
while (1) |
16 |
;//wl_do();
|
|
47 |
wl_do(); |
|
17 | 48 |
} |
branches/autonomous_recharging/code/projects/libwireless/bayboardTest/Makefile | ||
---|---|---|
1 | 1 |
########Update This Section######## |
2 |
# BAYBOARD TEST MAKEFILE |
|
2 | 3 |
# |
3 |
# |
|
4 | 4 |
|
5 | 5 |
# Relative path to the root directory (containing lib directory) |
6 | 6 |
ifndef COLONYROOT |
Also available in: Unified diff