Project

General

Profile

Revision 110

Slam stuff! Stuff is cool.

View differences:

branches/slam/code/projects/libwireless/lib/wl_token_ring.c
752 752
		i++;
753 753
	if (i == sensor_matrix_get_size(sensorMatrix))
754 754
		i = -1;
755
  iteratorCount = i;
755 756
}
756 757

  
757 758
/**
......
765 766
 **/
766 767
int wl_token_iterator_has_next(void)
767 768
{
768
	return iteratorCount == -1;
769
	return iteratorCount != -1;
769 770
}
770 771

  
771 772
/**
branches/slam/code/projects/libwireless/lib/xbee.c
144 144
	#endif
145 145
	sei();
146 146
	#else
147
	xbee_stream = open(WL_XBEE_PORT, O_RDWR);
147
	xbee_stream = open(XBEE_PORT, O_RDWR);
148 148
	if (xbee_stream == -1 || lockf(xbee_stream, F_TEST, 0) != 0)
149 149
	{
150 150
		printf("Failed to open connection to XBee.\r\n");
branches/slam/code/projects/libwireless/lib/wl_defs.h
2 2
//#define ROBOT
3 3

  
4 4
//uncomment this line for debug information
5
#define WL_DEBUG
5
//#define WL_DEBUG
6 6

  
7 7
// Packet Groups and Types
8 8

  
......
53 53
#ifdef ROBOT
54 54
#define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
55 55
#else
56
#define WL_XBEE_PORT "/dev/cu.usbserial-A4001hAN"
57 56
#define WL_DEBUG_PRINT_INT( i ) printf("%i", i)
58 57
#endif
59 58

  
branches/slam/code/projects/libwireless/lib/xbee.h
37 37
/**@brief A packet received from another XBee **/
38 38
#define XBEE_RX 0x81
39 39

  
40
#define XBEE_PORT "/dev/cu.usbserial-A4001hAN"
41

  
42

  
40 43
/**@brief Initialize the XBee library **/
41 44
void xbee_lib_init(void);
42 45
/**@brief Uninitialize the XBee library **/
branches/slam/code/projects/libwireless/lib/Makefile
175 175
build: $(OBJ)
176 176
	$(AR) $(ALL_ASFLAGS) $(TARGET).a $(OBJ)
177 177

  
178
computer:
178
computer: 
179 179
	gcc *.c -g -I. -c
180 180
	ar rcs $(TARGET).a $(OBJ)
181
	$(COPY) $(TARGET).a $(COLONYROOT)/code/lib/bin
182
	$(COPY) *.c $(COLONYROOT)/code/lib/src/$(TARGET)
183
	$(COPY) *.h $(COLONYROOT)/code/lib/include/$(TARGET)
184
	
181 185

  
182 186
# Eye candy.
183 187
# AVR Studio 3.x does not check make's exit code but relies on

Also available in: Unified diff