diff --git a/library.json b/library.json index b1d4226..d04e096 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TinyGSM", - "version": "0.4.2", + "version": "0.4.3", "description": "A small Arduino library for GPRS modules, that just works. Includes examples for Blynk, MQTT, File Download, and Web Client. Supports many GSM and wifi modules with AT command interfaces.", "keywords": "GSM, AT commands, AT, SIM800, SIM900, A6, A7, M590, ESP8266, SIM800A, SIM800C, SIM800L, SIM800H, SIM808, SIM868, SIM900A, SIM900D, SIM908, SIM968, M95, MC60, MC60E, BG96, ublox", "authors": diff --git a/library.properties b/library.properties index 83d7f81..8c65d1a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TinyGSM -version=0.4.2 +version=0.4.3 author=Volodymyr Shymanskyy maintainer=Volodymyr Shymanskyy sentence=A small Arduino library for GPRS modules, that just works. diff --git a/src/TinyGsmClientA6.h b/src/TinyGsmClientA6.h index 23ea0fc..5e9d84d 100644 --- a/src/TinyGsmClientA6.h +++ b/src/TinyGsmClientA6.h @@ -215,10 +215,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientBG96.h b/src/TinyGsmClientBG96.h index 8852148..5809f04 100644 --- a/src/TinyGsmClientBG96.h +++ b/src/TinyGsmClientBG96.h @@ -232,10 +232,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientESP8266.h b/src/TinyGsmClientESP8266.h index 191ee8d..91f0319 100644 --- a/src/TinyGsmClientESP8266.h +++ b/src/TinyGsmClientESP8266.h @@ -230,10 +230,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientM590.h b/src/TinyGsmClientM590.h index 63c4293..fa4eb57 100644 --- a/src/TinyGsmClientM590.h +++ b/src/TinyGsmClientM590.h @@ -207,10 +207,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientM95.h b/src/TinyGsmClientM95.h index 90cec31..2642b2f 100644 --- a/src/TinyGsmClientM95.h +++ b/src/TinyGsmClientM95.h @@ -236,10 +236,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientMC60.h b/src/TinyGsmClientMC60.h index c838b10..08cd77d 100644 --- a/src/TinyGsmClientMC60.h +++ b/src/TinyGsmClientMC60.h @@ -243,10 +243,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index 4710df4..924275a 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -258,10 +258,7 @@ public: //streamWrite(GF("AAAAA" GSM_NL)); // TODO: extra A's to help detect the baud rate for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientUBLOX.h b/src/TinyGsmClientUBLOX.h index 10751f0..43a1c63 100644 --- a/src/TinyGsmClientUBLOX.h +++ b/src/TinyGsmClientUBLOX.h @@ -252,10 +252,7 @@ public: bool testAT(unsigned long timeout = 10000L) { for (unsigned long start = millis(); millis() - start < timeout; ) { sendAT(GF("")); - if (waitResponse(200) == 1) { - delay(100); - return true; - } + if (waitResponse(200) == 1) return true; delay(100); } return false; diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index d969d93..8191330 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -276,9 +276,9 @@ public: { sendAT(); if (waitResponse(200) == 1) { + exitCommand(); return true; } - exitCommand(); } delay(100); }