Extra braces
This commit is contained in:
@@ -511,7 +511,9 @@ protected:
|
||||
|
||||
bool modemConnect(const char* host, uint16_t port, uint8_t mux,
|
||||
bool ssl = false, int timeout_s = 20) {
|
||||
if (ssl) DBG("SSL not yet supported on this module!");
|
||||
if (ssl) {
|
||||
DBG("SSL not yet supported on this module!");
|
||||
}
|
||||
int rsp;
|
||||
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
|
||||
|
||||
@@ -570,7 +572,9 @@ protected:
|
||||
streamSkipUntil(','); // Skip total received
|
||||
streamSkipUntil(','); // Skip have read
|
||||
result = stream.readStringUntil('\n').toInt();
|
||||
if (result) DBG("### DATA AVAILABLE:", result, "on", mux);
|
||||
if (result) {
|
||||
DBG("### DATA AVAILABLE:", result, "on", mux);
|
||||
}
|
||||
waitResponse();
|
||||
}
|
||||
if (!result) {
|
||||
|
@@ -574,7 +574,9 @@ protected:
|
||||
|
||||
bool modemConnect(const char* host, uint16_t port, uint8_t mux,
|
||||
bool ssl = false, int timeout_s = 75) {
|
||||
if (ssl) DBG("SSL not yet supported on this module!");
|
||||
if (ssl) {
|
||||
DBG("SSL not yet supported on this module!");
|
||||
}
|
||||
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
|
||||
sendAT(GF("+QIOPEN="), mux, GF("\"TCP"), GF("\",\""), host, GF("\","), port);
|
||||
int rsp = waitResponse(timeout_ms,
|
||||
|
@@ -815,16 +815,17 @@ protected:
|
||||
|
||||
bool modemConnect(const char* host, uint16_t port, uint8_t mux,
|
||||
bool ssl = false, int timeout_s = 75) {
|
||||
if (ssl) DBG("SSL not yet supported on this module!");
|
||||
if (ssl) {
|
||||
DBG("SSL not yet supported on this module!");
|
||||
}
|
||||
|
||||
int rsp;
|
||||
uint32_t timeout_ms = ((uint32_t)timeout_s)*1000;
|
||||
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port);
|
||||
rsp = waitResponse(timeout_ms,
|
||||
GF("CONNECT OK" GSM_NL),
|
||||
GF("CONNECT FAIL" GSM_NL),
|
||||
GF("ALREADY CONNECT" GSM_NL),
|
||||
GF("ERROR" GSM_NL),
|
||||
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
|
||||
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","),
|
||||
port);
|
||||
rsp = waitResponse(
|
||||
timeout_ms, GF("CONNECT OK" GSM_NL), GF("CONNECT FAIL" GSM_NL),
|
||||
GF("ALREADY CONNECT" GSM_NL), GF("ERROR" GSM_NL),
|
||||
GF("CLOSE OK" GSM_NL) // Happens when HTTPS handshake fails
|
||||
);
|
||||
return (1 == rsp);
|
||||
|
@@ -655,9 +655,12 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
bool modemConnect(const char* host, uint16_t port, uint8_t mux,
|
||||
bool ssl = false, int timeout_s = 15) {
|
||||
if (ssl) DBG("SSL not yet supported on this module!");
|
||||
if (ssl) {
|
||||
DBG("SSL not yet supported on this module!");
|
||||
}
|
||||
// Make sure we'll be getting data manually on this connection
|
||||
sendAT(GF("+CIPRXGET=1"));
|
||||
if (waitResponse() != 1) {
|
||||
|
@@ -925,7 +925,9 @@ public:
|
||||
bool ssl = false, int timeout_s = 75) {
|
||||
bool success = true;
|
||||
|
||||
if (timeout_s != 75) DBG("Timeout doesn't apply here.");
|
||||
if (timeout_s != 75) {
|
||||
DBG("Timeout doesn't apply here.");
|
||||
}
|
||||
|
||||
// empty the saved currelty-in-use destination address
|
||||
savedOperatingIP = IPAddress(0, 0, 0, 0);
|
||||
@@ -974,7 +976,9 @@ public:
|
||||
}
|
||||
|
||||
int16_t modemSend(const void* buff, size_t len, uint8_t mux = 0) {
|
||||
if (mux != 0) DBG("XBee only supports 1 IP channel in transparent mode!");
|
||||
if (mux != 0) {
|
||||
DBG("XBee only supports 1 IP channel in transparent mode!");
|
||||
}
|
||||
stream.write((uint8_t*)buff, len);
|
||||
stream.flush();
|
||||
|
||||
|
Reference in New Issue
Block a user