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 ESP8266 by
Revision 3:6124a6e99b86, committed 2016-05-12
- Comitter:
- capantojar
- Date:
- Thu May 12 21:45:10 2016 +0000
- Parent:
- 2:77388e8f0697
- Commit message:
- 12/05/2016
Changed in this revision
| ESP8266.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ESP8266.cpp Sun Dec 28 21:58:49 2014 +0000
+++ b/ESP8266.cpp Thu May 12 21:45:10 2016 +0000
@@ -66,6 +66,8 @@
Timer t;
bool ended = 0;
char c;
+ bool O = false;
+ bool K = false;
strcpy(r, "");
t.start();
@@ -73,10 +75,15 @@
if(comm.readable()) {
c = comm.getc();
AddChar(r, c);
+ if (K && c == 'K') ended = 1;
+ else K = false;
+ if (O && c == 'O') K = true;
+ else O = false;
+ if (c == '\n') O = true;
t.start();
}
if(t.read_ms() > to) {
- ended = 1;
+ ended = 1;
}
}
AddChar(r, 0x00);
