Added AAAAA's to help with autoBaud
This commit is contained in:
@@ -187,6 +187,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool autoBaud(unsigned long timeout = 10000L) {
|
bool autoBaud(unsigned long timeout = 10000L) {
|
||||||
|
streamWrite(GF("AAAAAAAAAAAA")); // some extra A's to help detect the baud rate
|
||||||
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
||||||
sendAT(GF(""));
|
sendAT(GF(""));
|
||||||
if (waitResponse(200) == 1) {
|
if (waitResponse(200) == 1) {
|
||||||
@@ -620,9 +621,9 @@ private:
|
|||||||
String streamReadUntil(char c) {
|
String streamReadUntil(char c) {
|
||||||
String return_string = stream.readStringUntil(c);
|
String return_string = stream.readStringUntil(c);
|
||||||
return_string.trim();
|
return_string.trim();
|
||||||
// if (String(c) == GSM_NL || String(c) == "\n"){
|
if (String(c) == GSM_NL || String(c) == "\n"){
|
||||||
// DBG(return_string, c, " ");
|
DBG(return_string, c, " ");
|
||||||
// } else DBG(return_string, c);
|
} else DBG(return_string, c);
|
||||||
return return_string;
|
return return_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,9 +631,9 @@ private:
|
|||||||
String skipped = stream.readStringUntil(c);
|
String skipped = stream.readStringUntil(c);
|
||||||
skipped.trim();
|
skipped.trim();
|
||||||
if (skipped.length()) {
|
if (skipped.length()) {
|
||||||
// if (String(c) == GSM_NL || String(c) == "\n"){
|
if (String(c) == GSM_NL || String(c) == "\n"){
|
||||||
// DBG(skipped, c, " ");
|
DBG(skipped, c, " ");
|
||||||
// } else DBG(skipped, c);
|
} else DBG(skipped, c);
|
||||||
return true;
|
return true;
|
||||||
} else return false;
|
} else return false;
|
||||||
}
|
}
|
||||||
@@ -710,15 +711,15 @@ private:
|
|||||||
}
|
}
|
||||||
data = "";
|
data = "";
|
||||||
}
|
}
|
||||||
// else {
|
else {
|
||||||
// data.trim();
|
data.trim();
|
||||||
// data.replace(GSM_NL GSM_NL, GSM_NL);
|
data.replace(GSM_NL GSM_NL, GSM_NL);
|
||||||
// data.replace(GSM_NL, GSM_NL " ");
|
data.replace(GSM_NL, GSM_NL " ");
|
||||||
// if (data.length()) {
|
if (data.length()) {
|
||||||
// DBG(GSM_NL, "<<< ", data);
|
DBG(GSM_NL, "<<< ", data);
|
||||||
// }
|
}
|
||||||
// data = "";
|
data = "";
|
||||||
// }
|
}
|
||||||
if (gotData) {
|
if (gotData) {
|
||||||
sockets[mux]->sock_available = modemGetAvailable(mux);
|
sockets[mux]->sock_available = modemGetAvailable(mux);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user