Project

General

Profile

Revision 1615

Added by Chris Mar over 14 years ago

fixed references to handler array, wireless_receive compiles now

View differences:

wireless_receive.c
60 60
extern uint8_t basic_buf_last;	// end of last packet in basic buffer
61 61
extern uint8_t other_buf_first; // beginning of first packet in other buffer
62 62
extern uint8_t other_buf_last;  // end of last packet in other buffer
63
extern void (*handlers[])(void);    // array of pointers to normal-priority packet handlers
64 63

  
65 64
/**
66 65
 * @addtogroup wireless Wireless
......
144 143
	 */
145 144
	buf_pos++;
146 145
	group = xbee_other_buf[buf_pos];    // get group from packet
147
	if (group >= WL_NUM_PACKET_GROUPS)  // invalid group number
146
	if (group >= MAX_PACKET_GROUPS)  // invalid group number
148 147
	    buf_pos += length - 1 + 1;	// go to first byte of next packet
149 148
	else {	// valid group number
150
	    handler = handlers[group].FUNC;	// get function from handler array
149
	    handler = wl_packet_handlers[group].FUNC;	// get function from handler array
151 150
	    buf_pos++;
152 151
	    buf_pos++;  // ignore 1st byte of ID (will be all 0s)
153 152
	    source = xbee_other_buf[buf_pos];   // get sender ID from packet

Also available in: Unified diff