Statistics
| Revision:

root / trunk / code / projects / colonet / robot / robot_slave / robot_slave.c @ 680

History | View | Annotate | Download (643 Bytes)

1
/**
2
 * Eugene Marinelli
3
 * 4/5/07
4
 *
5
 * Robot slave program -- just listens for packets
6
 */
7

    
8
#include <dragonfly_lib.h>
9
#include <colonet_dragonfly.h>
10
#include <wireless.h>
11
#include <wl_token_ring.h>
12
#include <serial.h>
13
#include <stdio.h>
14

    
15
int behavior_status;
16

    
17
static void step() {}
18

    
19
int main(void) {
20
  dragonfly_init(ALL_ON);
21

    
22
  orb_set_color(RED);
23
  usb_puts("calling wl_init\n");
24

    
25
  wl_init();
26
  colonet_init();
27

    
28
  wl_token_ring_register();
29

    
30
  if (wl_token_ring_join() == 0) {
31
    orb_set_color(GREEN);
32

    
33
    colonet_run(step);
34
  } else {
35
    orb_set_color(RED);
36
  }
37

    
38
  usb_puts("Failed to join token ring.\n");
39

    
40
  while(1);
41

    
42
  return 0;
43
}