Browse Source

Unify debug

v_master
Volodymyr Shymanskyy 8 years ago
parent
commit
0ebf881ec5
4 changed files with 11 additions and 11 deletions
  1. +2
    -2
      TinyGsmClientM590.h
  2. +4
    -4
      TinyGsmClientSIM800.h
  3. +4
    -4
      TinyGsmCommon.h
  4. +1
    -1
      TinyWiFiClientESP8266.h

+ 2
- 2
TinyGsmClientM590.h View File

@ -9,7 +9,7 @@
#ifndef TinyGsmClientM590_h
#define TinyGsmClientM590_h
//#define GSM_DEBUG Serial
//#define TINY_GSM_DEBUG Serial
#if !defined(TINY_GSM_RX_BUFFER)
#define TINY_GSM_RX_BUFFER 256
@ -176,7 +176,7 @@ public:
if (waitResponse() != 1) {
return false;
}
#ifdef GSM_DEBUG
#ifdef TINY_GSM_DEBUG
sendAT(GF("+CMEE=2"));
waitResponse();
#endif


+ 4
- 4
TinyGsmClientSIM800.h View File

@ -9,8 +9,8 @@
#ifndef TinyGsmClientSIM800_h
#define TinyGsmClientSIM800_h
//#define GSM_DEBUG Serial
//#define GSM_USE_HEX
//#define TINY_GSM_DEBUG Serial
//#define TINY_GSM_USE_HEX
#if !defined(TINY_GSM_RX_BUFFER)
#define TINY_GSM_RX_BUFFER 64
@ -537,7 +537,7 @@ private:
}
size_t modemRead(size_t size, uint8_t mux) {
#ifdef GSM_USE_HEX
#ifdef TINY_GSM_USE_HEX
sendAT(GF("+CIPRXGET=3,"), mux, ',', size);
if (waitResponse(GF("+CIPRXGET:")) != 1) {
return 0;
@ -554,7 +554,7 @@ private:
sockets[mux]->sock_available = stream.readStringUntil('\n').toInt();
for (size_t i=0; i<len; i++) {
#ifdef GSM_USE_HEX
#ifdef TINY_GSM_USE_HEX
while (stream.available() < 2) {}
char buf[4] = { 0, };
buf[0] = stream.read();


+ 4
- 4
TinyGsmCommon.h View File

@ -38,17 +38,17 @@
#define GF(x) x
#endif
#ifdef GSM_DEBUG
#ifdef TINY_GSM_DEBUG
namespace {
template<typename T>
static void DBG(T last) {
GSM_DEBUG.println(last);
TINY_GSM_DEBUG.println(last);
}
template<typename T, typename... Args>
static void DBG(T head, Args... tail) {
GSM_DEBUG.print(head);
GSM_DEBUG.print(' ');
TINY_GSM_DEBUG.print(head);
TINY_GSM_DEBUG.print(' ');
DBG(tail...);
}
}


+ 1
- 1
TinyWiFiClientESP8266.h View File

@ -9,7 +9,7 @@
#ifndef TinyWiFiClientESP8266_h
#define TinyWiFiClientESP8266_h
//#define GSM_DEBUG Serial
//#define TINY_GSM_DEBUG Serial
#if !defined(TINY_GSM_RX_BUFFER)
#define TINY_GSM_RX_BUFFER 256


Loading…
Cancel
Save