Some class cleaning

This commit is contained in:
Sara Damiano
2018-09-10 15:25:13 -04:00
parent 56dca5185b
commit 63ed6fafb7
12 changed files with 201 additions and 195 deletions

View File

@@ -187,11 +187,8 @@ public:
/*
* Basic functions
*/
bool begin() {
return init();
}
bool init() {
bool init(const char* pin = NULL) {
if (!testAT()) {
return false;
}
@@ -208,6 +205,10 @@ public:
return true;
}
String getModemName() {
return "Neoway M590";
}
void setBaud(unsigned long baud) {
sendAT(GF("+IPR="), baud);
}
@@ -259,6 +260,14 @@ public:
return false;
}
bool hasWifi() {
return false;
}
bool hasGPRS() {
return true;
}
/*
* Power functions
*/
@@ -379,22 +388,6 @@ public:
return (s == REG_OK_HOME || s == REG_OK_ROAMING);
}
bool waitForNetwork(unsigned long timeout = 60000L) {
for (unsigned long start = millis(); millis() - start < timeout; ) {
if (isNetworkConnected()) {
return true;
}
delay(250);
}
return false;
}
/*
* WiFi functions
*/
bool networkConnect(const char* ssid, const char* pwd) TINY_GSM_ATTR_NOT_AVAILABLE;
bool networkDisconnect() TINY_GSM_ATTR_NOT_AVAILABLE;
/*
* GPRS functions
*/