Browse Source

Minor debugging tweaks

v_master
SRGDamia1 7 years ago
parent
commit
b0827e9565
2 changed files with 8 additions and 5 deletions
  1. +0
    -1
      TinyGsmClientSIM800.h
  2. +8
    -4
      TinyGsmClientXBee.h

+ 0
- 1
TinyGsmClientSIM800.h View File

@ -618,7 +618,6 @@ public:
if (gotData) {
sockets[mux]->sock_available = modemGetAvailable(mux);
}
data = "";
return index;
}


+ 8
- 4
TinyGsmClientXBee.h View File

@ -285,7 +285,12 @@ public:
bool waitForNetwork(unsigned long timeout = 60000L) {
for (unsigned long start = millis(); millis() - start < timeout; ) {
if (modemGetConnected()) {
commandMode();
sendAT(GF("AI"));
waitResponse();
String res = streamReadUntil('\r');
exitCommand();
if (res == 0) {
return true;
}
delay(1000);
@ -389,7 +394,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("\r\n", ">>> AT:", cmd...);
DBG("\r\n", ">>> AT ", cmd..., "\r\n");
}
// TODO: Optimize this!
@ -444,13 +449,12 @@ public:
data.replace(GSM_NL GSM_NL, GSM_NL);
data.replace(GSM_NL, "\r\n" " ");
if (data.length()) {
DBG(GSM_NL, "<<< ", data);
DBG("\r\n", "<<< ", data);
}
}
// if (gotData) {
// sockets[mux]->sock_available = modemGetAvailable(mux);
// }
data = "";
return index;
}


Loading…
Cancel
Save