Wait for isGprsConnected()

This commit is contained in:
Volodymyr Shymanskyy
2017-09-27 23:53:38 +03:00
parent 7b33483852
commit 679d957ab9

View File

@@ -392,22 +392,22 @@ public:
sendAT(GF("+XIIC=1"));
waitResponse();
delay(10000L); // TODO
sendAT(GF("+XIIC?"));
waitResponse();
for (unsigned long start = millis(); millis() - start < timeout; ) {
if (isGprsConnected()) {
return true;
}
delay(500);
}
/*
sendAT(GF("+DNSSERVER=1,8.8.8.8"));
waitResponse();
sendAT(GF("+DNSSERVER=2,8.8.4.4"));
if (waitResponse() != 1) {
return false;
}
waitResponse();
*/
return true;
return false;
}
bool gprsDisconnect() {