Revision 418
added return values to a bunch of libwireless functions. Makefile for colonetserver now compiles libwireless when necessary. added static to a bunch of libwireless vars. commented out colonet timeout
wireless.c | ||
---|---|---|
168 | 168 |
* |
169 | 169 |
* @see wl_get_pan |
170 | 170 |
**/ |
171 |
void wl_set_pan(int pan)
|
|
171 |
int wl_set_pan(int pan)
|
|
172 | 172 |
{ |
173 |
xbee_set_pan_id(pan); |
|
173 |
return xbee_set_pan_id(pan);
|
|
174 | 174 |
} |
175 | 175 |
|
176 | 176 |
/** |
... | ... | |
192 | 192 |
* |
193 | 193 |
* @see wl_get_channel |
194 | 194 |
**/ |
195 |
void wl_set_channel(int channel)
|
|
195 |
int wl_set_channel(int channel)
|
|
196 | 196 |
{ |
197 |
xbee_set_channel(channel); |
|
197 |
return xbee_set_channel(channel);
|
|
198 | 198 |
} |
199 | 199 |
|
200 | 200 |
/** |
... | ... | |
229 | 229 |
* @param dest the 16-bit address of the XBee to send the packet to |
230 | 230 |
* @param frame the frame number to see with a TX_STATUS response |
231 | 231 |
**/ |
232 |
void wl_send_robot_to_robot_global_packet(char group, char type, |
|
233 |
char* data, int len, int dest, char frame) |
|
232 |
int wl_send_robot_to_robot_global_packet(char group, char type, char* data, int len, int dest, char frame) |
|
234 | 233 |
{ |
235 |
wl_send_packet(group, type, data, len, dest, |
|
236 |
XBEE_OPTIONS_BROADCAST_ALL_PANS, frame); |
|
234 |
return wl_send_packet(group, type, data, len, dest, XBEE_OPTIONS_BROADCAST_ALL_PANS, frame); |
|
237 | 235 |
} |
238 | 236 |
|
239 | 237 |
/** |
... | ... | |
246 | 244 |
* @param dest the 16-bit address of the XBee to send the packet to |
247 | 245 |
* @param frame the frame number to see with a TX_STATUS response |
248 | 246 |
**/ |
249 |
void wl_send_robot_to_robot_packet(char group, char type, |
|
250 |
char* data, int len, int dest, char frame) |
|
247 |
int wl_send_robot_to_robot_packet(char group, char type, char* data, int len, int dest, char frame) |
|
251 | 248 |
{ |
252 |
wl_send_packet(group, type, data, len, dest, XBEE_OPTIONS_NONE, |
|
253 |
frame); |
|
249 |
return wl_send_packet(group, type, data, len, dest, XBEE_OPTIONS_NONE, frame); |
|
254 | 250 |
} |
255 | 251 |
|
256 | 252 |
/** |
... | ... | |
388 | 384 |
//this only works with under 16 groups |
389 | 385 |
int group = (int)(wl_buf[1] >> 4); |
390 | 386 |
int success = 0; |
391 |
if (wl_buf[2] == 0) |
|
387 |
if (wl_buf[2] == 0) {
|
|
392 | 388 |
success = 1; |
389 |
} |
|
393 | 390 |
else |
394 | 391 |
{ |
395 | 392 |
WL_DEBUG_PRINT("No response received.\r\n"); |
Also available in: Unified diff