Unify debug
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#ifndef TinyGsmClientM590_h
|
#ifndef TinyGsmClientM590_h
|
||||||
#define TinyGsmClientM590_h
|
#define TinyGsmClientM590_h
|
||||||
|
|
||||||
//#define GSM_DEBUG Serial
|
//#define TINY_GSM_DEBUG Serial
|
||||||
|
|
||||||
#if !defined(TINY_GSM_RX_BUFFER)
|
#if !defined(TINY_GSM_RX_BUFFER)
|
||||||
#define TINY_GSM_RX_BUFFER 256
|
#define TINY_GSM_RX_BUFFER 256
|
||||||
@@ -176,7 +176,7 @@ public:
|
|||||||
if (waitResponse() != 1) {
|
if (waitResponse() != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef GSM_DEBUG
|
#ifdef TINY_GSM_DEBUG
|
||||||
sendAT(GF("+CMEE=2"));
|
sendAT(GF("+CMEE=2"));
|
||||||
waitResponse();
|
waitResponse();
|
||||||
#endif
|
#endif
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
#ifndef TinyGsmClientSIM800_h
|
#ifndef TinyGsmClientSIM800_h
|
||||||
#define TinyGsmClientSIM800_h
|
#define TinyGsmClientSIM800_h
|
||||||
|
|
||||||
//#define GSM_DEBUG Serial
|
//#define TINY_GSM_DEBUG Serial
|
||||||
//#define GSM_USE_HEX
|
//#define TINY_GSM_USE_HEX
|
||||||
|
|
||||||
#if !defined(TINY_GSM_RX_BUFFER)
|
#if !defined(TINY_GSM_RX_BUFFER)
|
||||||
#define TINY_GSM_RX_BUFFER 64
|
#define TINY_GSM_RX_BUFFER 64
|
||||||
@@ -537,7 +537,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t modemRead(size_t size, uint8_t mux) {
|
size_t modemRead(size_t size, uint8_t mux) {
|
||||||
#ifdef GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
sendAT(GF("+CIPRXGET=3,"), mux, ',', size);
|
sendAT(GF("+CIPRXGET=3,"), mux, ',', size);
|
||||||
if (waitResponse(GF("+CIPRXGET:")) != 1) {
|
if (waitResponse(GF("+CIPRXGET:")) != 1) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -554,7 +554,7 @@ private:
|
|||||||
sockets[mux]->sock_available = stream.readStringUntil('\n').toInt();
|
sockets[mux]->sock_available = stream.readStringUntil('\n').toInt();
|
||||||
|
|
||||||
for (size_t i=0; i<len; i++) {
|
for (size_t i=0; i<len; i++) {
|
||||||
#ifdef GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
while (stream.available() < 2) {}
|
while (stream.available() < 2) {}
|
||||||
char buf[4] = { 0, };
|
char buf[4] = { 0, };
|
||||||
buf[0] = stream.read();
|
buf[0] = stream.read();
|
||||||
|
@@ -38,17 +38,17 @@
|
|||||||
#define GF(x) x
|
#define GF(x) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GSM_DEBUG
|
#ifdef TINY_GSM_DEBUG
|
||||||
namespace {
|
namespace {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static void DBG(T last) {
|
static void DBG(T last) {
|
||||||
GSM_DEBUG.println(last);
|
TINY_GSM_DEBUG.println(last);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
static void DBG(T head, Args... tail) {
|
static void DBG(T head, Args... tail) {
|
||||||
GSM_DEBUG.print(head);
|
TINY_GSM_DEBUG.print(head);
|
||||||
GSM_DEBUG.print(' ');
|
TINY_GSM_DEBUG.print(' ');
|
||||||
DBG(tail...);
|
DBG(tail...);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#ifndef TinyWiFiClientESP8266_h
|
#ifndef TinyWiFiClientESP8266_h
|
||||||
#define TinyWiFiClientESP8266_h
|
#define TinyWiFiClientESP8266_h
|
||||||
|
|
||||||
//#define GSM_DEBUG Serial
|
//#define TINY_GSM_DEBUG Serial
|
||||||
|
|
||||||
#if !defined(TINY_GSM_RX_BUFFER)
|
#if !defined(TINY_GSM_RX_BUFFER)
|
||||||
#define TINY_GSM_RX_BUFFER 256
|
#define TINY_GSM_RX_BUFFER 256
|
||||||
|
Reference in New Issue
Block a user