Project

General

Profile

Revision 86

Updated wireless library, fixing bug and now works for a firefly if FIREFLY is defined.

View differences:

wl_token_ring.c
9 9
#include <queue.h>
10 10

  
11 11
#ifdef ROBOT
12
#ifndef FIREFLY
12 13
#include <bom.h>
14
#endif
13 15
#include <time.h>
14 16
#endif
15 17

  
......
73 75
//current robot to check in the iterator
74 76
int iteratorCount = 0;
75 77

  
78
void do_nothing(void) {}
79
int get_nothing(void) {return -1;}
80

  
76 81
#ifdef ROBOT
82
#ifndef FIREFLY
77 83
void (*bom_on_function) (void) = bom_on;
78 84
void (*bom_off_function) (void) = bom_off;
79 85
int (*get_max_bom_function) (void) = get_max_bom;
80 86
#else
81
void do_nothing(void) {}
82
int get_nothing(void) {return -1;}
83 87
void (*bom_on_function) (void) = do_nothing;
84 88
void (*bom_off_function) (void) = do_nothing;
85 89
int (*get_max_bom_function) (void) = get_nothing;
86 90
#endif
91
#else
92
void (*bom_on_function) (void) = do_nothing;
93
void (*bom_off_function) (void) = do_nothing;
94
int (*get_max_bom_function) (void) = get_nothing;
95
#endif
87 96

  
88 97
PacketGroupHandler wl_token_ring_handler =
89 98
		{WL_TOKEN_RING_GROUP, wl_token_ring_timeout_handler,
......
736 745
 **/
737 746
void wl_token_iterator_begin(void)
738 747
{
739
	int i;
748
	int i = 0;
740 749
	iteratorCount = 0;
741 750
	while (!sensor_matrix_get_in_ring(sensorMatrix, i) &&
742 751
			i < sensor_matrix_get_size(sensorMatrix))

Also available in: Unified diff