Rename autoBaud -> testAT
This commit is contained in:
@@ -208,7 +208,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool init(const char* pin = NULL) {
|
bool init(const char* pin = NULL) {
|
||||||
if (!autoBaud()) {
|
if (!testAT()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sendAT(GF("E0")); // Echo Off
|
sendAT(GF("E0")); // Echo Off
|
||||||
@@ -226,7 +226,7 @@ public:
|
|||||||
sendAT(GF("+IPR="), baud);
|
sendAT(GF("+IPR="), baud);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool autoBaud(unsigned long timeout = 10000L) {
|
bool testAT(unsigned long timeout = 10000L) {
|
||||||
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) {
|
||||||
@@ -263,7 +263,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
bool restart() {
|
bool restart() {
|
||||||
if (!autoBaud()) {
|
if (!testAT()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sendAT(GF("+CFUN=16"));
|
sendAT(GF("+CFUN=16"));
|
||||||
|
|||||||
Reference in New Issue
Block a user