Project

General

Profile

Statistics
| Revision:

root / branches / autonomous_recharging / code / projects / autonomous_recharging / dragonfly / main.c @ 321

History | View | Annotate | Download (930 Bytes)

1
#include <dragonfly_lib.h>
2
#include <wireless.h>
3
#include <wl_token_ring.h>
4
#include <rangefinder.h>
5
#include "smart_run_around_fsm.h"
6

    
7
#include "recharge.h"
8

    
9
void do_nothing2(void) {}
10
int get_nothing2(void) {return 0;}
11

    
12
int main(void)
13
{
14
        dragonfly_init(ALL_ON);
15
        //range_init();
16
        //orb_enable();
17
        usb_puts("Turned on!\n");
18
        wl_init();
19
        usb_puts("Wireless initialized!\n");
20
        wl_set_channel(0xA);
21
        //orb_set_color(YELLOW);
22
        wl_token_ring_register();
23
        //wl_token_ring_set_bom_functions(do_nothing2, do_nothing2, get_nothing2); 
24
        wl_token_ring_join();
25
        //usb_puts("Wireless initialized.\n");
26
        //recharge_init();
27
        //usb_puts("Recharging initialized.\n");
28
        run_around_init();
29
        while (1)
30
        {
31
                wl_do();
32
                int i;
33
                for (i = 6; i > 0; i--)
34
                {
35
                        usb_puti(analog_get8(i));
36
                        usb_putc(' ');
37
                }
38
                usb_putc('\n');
39
                //int charging = recharge_do();
40
                //if (!charging)
41
                //{
42
                        //analog8(IR1);
43
                        //run_around_FSM();
44
                //}
45
        }
46
        
47
        return 0;
48
}
49