Pull back changes

This commit is contained in:
Sara Damiano
2018-09-14 10:44:18 -04:00
12 changed files with 55 additions and 54 deletions

View File

@@ -579,7 +579,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -587,12 +587,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -652,7 +652,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -661,7 +661,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -669,12 +669,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -730,7 +730,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -437,7 +437,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -445,12 +445,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -512,7 +512,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -589,7 +589,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -597,12 +597,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -663,7 +663,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -1,6 +1,6 @@
/**
* @file TinyGsmClientM95.h
* @author Volodymyr Shymanskyy - Modified by Pacman Pereira
* @author Volodymyr Shymanskyy, Pacman Pereira, and Replicade Ltd.
* @license LGPL-3.0
* @copyright Copyright (c) 2016 Volodymyr Shymanskyy, (c)2017 Replicade Ltd. <http://www.replicade.com>
* @date Nov 2016
@@ -741,7 +741,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -749,12 +749,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -807,7 +807,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -776,7 +776,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -784,13 +784,13 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL, GsmConstStr r6=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
String r6s(r6); r6s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s, ",", r6s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s, ",", r6s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -846,7 +846,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -695,7 +695,6 @@ public:
/*
* Battery functions
*/
// Use: float vBatt = modem.getBattVoltage() / 1000.0;
uint16_t getBattVoltage() {
sendAT(GF("+CBC"));
@@ -828,7 +827,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -836,12 +835,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -897,7 +896,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -653,7 +653,7 @@ public:
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -661,12 +661,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=GFP(GSM_CME_ERROR), GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(64);
int index = 0;
unsigned long startMillis = millis();
@@ -717,7 +717,7 @@ finish:
}
data = "";
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}

View File

@@ -724,17 +724,17 @@ public:
Utilities
*/
void streamClear(void) {
TINY_GSM_YIELD();
while (stream.available()) { stream.read(); }
}
void streamClear(void) {
TINY_GSM_YIELD();
while (stream.available()) { stream.read(); }
}
template<typename... Args>
void sendAT(Args... cmd) {
streamWrite("AT", cmd..., GSM_NL);
stream.flush();
TINY_GSM_YIELD();
DBG("### AT:", cmd...);
//DBG("### AT:", cmd...);
}
// TODO: Optimize this!
@@ -742,12 +742,12 @@ public:
GsmConstStr r1=GFP(GSM_OK), GsmConstStr r2=GFP(GSM_ERROR),
GsmConstStr r3=NULL, GsmConstStr r4=NULL, GsmConstStr r5=NULL)
{
String r1s(r1); r1s.trim();
/*String r1s(r1); r1s.trim();
String r2s(r2); r2s.trim();
String r3s(r3); r3s.trim();
String r4s(r4); r4s.trim();
String r5s(r5); r5s.trim();
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);
DBG("### ..:", r1s, ",", r2s, ",", r3s, ",", r4s, ",", r5s);*/
data.reserve(16); // Should never be getting much here for the XBee
int index = 0;
unsigned long startMillis = millis();
@@ -790,10 +790,10 @@ finish:
data.replace(GSM_NL GSM_NL, GSM_NL);
data.replace(GSM_NL, "\r\n ");
if (data.length()) {
DBG("<<< ", data);
// DBG("<<< ", data);
}
}
DBG('<', index, '>');
//DBG('<', index, '>');
return index;
}