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.
Revision 6:ac11cebb397e, committed 2017-03-14
- Comitter:
- quicksand
- Date:
- Tue Mar 14 15:20:26 2017 +0000
- Parent:
- 5:ca670603d63d
- Commit message:
- Code cleanup.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ca670603d63d -r ac11cebb397e main.cpp
--- a/main.cpp Tue Mar 14 15:08:58 2017 +0000
+++ b/main.cpp Tue Mar 14 15:20:26 2017 +0000
@@ -157,9 +157,9 @@
/* Wait untill serial feedback, max 10 seconds before timeout */
tmout.attach(&sertmout, 10.0);
int c;
- while(!ser_timeout && !ok && !error)
- while (modem.readable() && !ser_timeout && !ok && !error) {
- c = modem.getc();
+ while (!ser_timeout && !ok && !error) {
+ if(modem.readable()) {
+ c = modem.getc();
if ( (char)c == *readyStringPtr ) readyStringPtr++;
else readyStringPtr = readyString;
if ( *readyStringPtr == 0 ) {
@@ -171,7 +171,8 @@
error = true;
}
}
+ }
tmout.detach();
if(ser_timeout) return false;
else return ok;
- }
\ No newline at end of file
+}
\ No newline at end of file
QW SIGFOX Development Kit