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.
Dependents: Gateway_Cotosys Gateway_Cotosys_os5
Diff: ESP01.cpp
- Revision:
- 9:21290fc75c17
- Parent:
- 8:ef9014a530cf
diff -r ef9014a530cf -r 21290fc75c17 ESP01.cpp
--- a/ESP01.cpp Sun Sep 15 20:54:35 2019 +0000
+++ b/ESP01.cpp Mon Jan 06 04:39:26 2020 +0000
@@ -81,7 +81,7 @@
bool ESP01::GetIP(char *ip)
{
SendCMD("AT+CIFSR");
- return RcvReply(ip, 2000);
+ return RcvReply(ip, 3000);
}
//Defines wifi mode; Parameter: mode; 1= STA, 2= AP, 3=both
@@ -188,14 +188,16 @@
{
bool ended = 0;
char c;
+ Timer t;
strcpy(r, "");
+ t.start();
while(!ended) {
if(comm.readable()) {
c = comm.getc();
AddChar(r, c);
}
- if(c == 0x0D) {
+ if((c==0x0D)||(t.read_ms() > 5000)) {
ended = 1;
}
}