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 C027_Support by
Revision 6:775aef3f1d1f, committed 2013-11-09
- Comitter:
- mazgch
- Date:
- Sat Nov 09 12:20:25 2013 +0000
- Parent:
- 5:5362073f2689
- Child:
- 7:9aa830f5811e
- Commit message:
- only num read bytes that we have available
Changed in this revision
| GPS.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/GPS.cpp Sat Nov 02 16:08:20 2013 +0000
+++ b/GPS.cpp Sat Nov 09 12:20:25 2013 +0000
@@ -246,9 +246,13 @@
int GPSI2C::getMessage(char* buf, int len)
{
- int sz = _get(buf, len);
+ // fill the pipe
+ int sz = _pipe.free();
+ if (sz)
+ sz = _get(buf, sz);
if (sz)
_pipe.put(buf, sz);
+ // now parse it
return _getMessage(&_pipe, buf, len);
}
