Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
Diff: packet.h
- Revision:
- 51:d6b64ac3c30d
- Parent:
- 49:06721139d298
--- a/packet.h Sat Apr 26 04:26:48 2014 +0000 +++ b/packet.h Sat Apr 26 06:49:37 2014 +0000 @@ -184,11 +184,12 @@ char temp; int total_rec_bytes = 0;//total bytes received for this packet. while(total_rec_bytes < sizeof(PacketStruct)){ - if((rx_ret = rx_ready_with_timeout()) != 1){ + if(!outputDevice.readable() && (rx_ret = rx_ready_with_timeout(&outputDevice, 3)) != 1){ USB::getSerial().printf("timed out waiting for packet. Received %d/%d bytes\r\n",total_rec_bytes,sizeof(PacketStruct)); return rx_ret; } temp = outputDevice.getc(); + //USB::getSerial().printf("%c ",temp); *(((char*)pack) + total_rec_bytes) = temp; total_rec_bytes++; }