Revision 198
Recharging updated.
xbee.c | ||
---|---|---|
514 | 514 |
|| currentBufPos < len + 4) |
515 | 515 |
{ |
516 | 516 |
if (currentBufPos == 3) |
517 |
{ |
|
517 | 518 |
len = (int)xbee_buf[2] + ((int)xbee_buf[1] << 8); |
519 |
if (len > 120) |
|
520 |
{ |
|
521 |
WL_DEBUG_PRINT("Packet too large. Probably error in XBee transmission.\n"); |
|
522 |
currentBufPos = 0; |
|
523 |
return -1; |
|
524 |
} |
|
525 |
} |
|
518 | 526 |
if (queue_is_empty(xbee_queue)) |
519 | 527 |
return -1; |
520 | 528 |
xbee_buf[currentBufPos++] = (char)(int)queue_remove(xbee_queue); |
Also available in: Unified diff