Moved begin above init, reset historic buffer sizes

This commit is contained in:
Sara Damiano
2019-05-17 16:40:01 -04:00
parent 5411535870
commit 70ca06dc9d
16 changed files with 189 additions and 97 deletions

View File

@@ -13,6 +13,10 @@
//#define TINY_GSM_DEBUG Serial
//#define TINY_GSM_USE_HEX
#if !defined(TINY_GSM_RX_BUFFER)
#define TINY_GSM_RX_BUFFER 64
#endif
#define TINY_GSM_MUX_COUNT 5
#include <TinyGsmCommon.h>
@@ -162,6 +166,10 @@ public:
* Basic functions
*/
bool begin(const char* pin = NULL) {
return init(pin);
}
bool init(const char* pin = NULL) {
DBG(GF("### TinyGSM Version:"), TINYGSM_VERSION);
if (!testAT()) {
@@ -178,10 +186,6 @@ public:
return true;
}
bool begin(const char* pin = NULL) {
return init(pin);
}
String getModemName() {
#if defined(TINY_GSM_MODEM_SIM800)
return "SIMCom SIM800";
@@ -339,6 +343,7 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
/*
* GPRS functions
*/
bool gprsConnect(const char* apn, const char* user = NULL, const char* pwd = NULL) {
gprsDisconnect();
@@ -621,6 +626,7 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
/*
* Time functions
*/
String getGSMDateTime(TinyGSMDateTimeFormat format) {
sendAT(GF("+CCLK?"));
if (waitResponse(2000L, GF(GSM_NL "+CCLK: \"")) != 1) {