Project

General

Profile

Revision 213

Updated recharging code.

View differences:

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

  
6 7
#include "recharge.h"
7 8

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

  
8 12
int main(void)
9 13
{
10 14
	dragonfly_init(ALL_ON);
......
15 19
	wl_set_channel(0xA);
16 20
	//orb_set_color(YELLOW);
17 21
	wl_token_ring_register();
22
	wl_token_ring_set_bom_functions(do_nothing2, do_nothing2, get_nothing2); 
18 23
	wl_token_ring_join();
19 24
	usb_puts("Wireless initialized.\n");
20 25
	recharge_init();
21 26
	usb_puts("Recharging initialized.\n");
22

  
27
	//run_around_init();
23 28
	while (1)
24 29
	{
25 30
		wl_do();
26 31
		int charging = recharge_do();
27 32
		if (!charging)
28 33
		{
29
			//do stuff
34
			analog8(IR5);
35
			//run_around_FSM();
30 36
		}
31 37
	}
32 38
	

Also available in: Unified diff