Browse Source

Removed extra check for connection in available.

v_master
Sara Damiano 6 years ago
parent
commit
943c9a1fdd
7 changed files with 10 additions and 10 deletions
  1. +2
    -2
      src/TinyGsmClientA6.h
  2. +1
    -1
      src/TinyGsmClientBG96.h
  3. +1
    -1
      src/TinyGsmClientESP8266.h
  4. +1
    -1
      src/TinyGsmClientM95.h
  5. +1
    -1
      src/TinyGsmClientMC60.h
  6. +3
    -3
      src/TinyGsmClientSIM800.h
  7. +1
    -1
      src/TinyGsmClientUBLOX.h

+ 2
- 2
src/TinyGsmClientA6.h View File

@ -112,7 +112,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size();
@ -191,7 +191,7 @@ public:
if (waitResponse() != 1) {
return false;
}
sendAT(GF("+CMEE=0")); // Turn of verbose errors
sendAT(GF("+CMEE=0")); // Turn off verbose errors
waitResponse();
sendAT(GF("+CMER=3,0,0,2")); // Set unsolicited result code output destination
waitResponse();


+ 1
- 1
src/TinyGsmClientBG96.h View File

@ -112,7 +112,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size() + sock_available;


+ 1
- 1
src/TinyGsmClientESP8266.h View File

@ -109,7 +109,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size();


+ 1
- 1
src/TinyGsmClientM95.h View File

@ -112,7 +112,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size() + sock_available;


+ 1
- 1
src/TinyGsmClientMC60.h View File

@ -116,7 +116,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size() + sock_available;


+ 3
- 3
src/TinyGsmClientSIM800.h View File

@ -118,11 +118,11 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
// Workaround: sometimes SIM800 forgets to notify about data arrival.
// TODO: Currently we ping the module periodically,
// but maybe there's a better indicator that we need to poll
if (millis() - prev_check > 500) {
if (millis() - prev_check > 250) {
got_data = true;
prev_check = millis();
}
@ -147,7 +147,7 @@ public:
// Workaround: sometimes SIM800 forgets to notify about data arrival.
// TODO: Currently we ping the module periodically,
// but maybe there's a better indicator that we need to poll
if (millis() - prev_check > 500) {
if (millis() - prev_check > 250) {
got_data = true;
prev_check = millis();
}


+ 1
- 1
src/TinyGsmClientUBLOX.h View File

@ -110,7 +110,7 @@ public:
virtual int available() {
TINY_GSM_YIELD();
if (!rx.size() && sock_connected) {
if (!rx.size()) {
at->maintain();
}
return rx.size() + sock_available;


Loading…
Cancel
Save