Project

General

Profile

Revision 332

View differences:

branches/lemmings/code/behaviors/lemmings/leaderDriver.c
1
/** driver code for colonet lemmings leader
2
	continually execute lemmings behavior and listens for packets
3
*/
4

  
5
#include <dragonfly_lib.h>
6
#include <colonet_dragonfly.h>
7
#include <wireless.h>
8
#include <wl_token_ring.h>
9
#include <serial.h>
10
#include <stdio.h>
11
#include "lemmings.h"
12

  
13

  
14
int main(void) {
15
  // enable everything
16
  dragonfly_init(ALL_ON);
17
  orb_enable();
18
  wl_init();
19
  colonet_init();
20
  wl_token_ring_register();
21
  wl_token_ring_join(); // join token ring
22

  
23
  lemmings_init();
24

  
25
  while(1) {
26
    wl_do();
27
    lemmings_FSM(); // do lemmings
28
  }
29

  
30
  return 0;
31
}

Also available in: Unified diff