Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of dgps by
Diff: packet.h
- Revision:
- 51:d6b64ac3c30d
- Parent:
- 49:06721139d298
diff -r 030da136eacb -r d6b64ac3c30d packet.h --- 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++; }