mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Some class cleaning
This commit is contained in:
@@ -214,11 +214,8 @@ public:
|
||||
/*
|
||||
* Basic functions
|
||||
*/
|
||||
bool begin() {
|
||||
return init();
|
||||
}
|
||||
|
||||
bool init() {
|
||||
bool init(const char* pin = NULL) {
|
||||
if (!testAT()) {
|
||||
return false;
|
||||
}
|
||||
@@ -230,6 +227,10 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
String getModemName() {
|
||||
return "Quectel BG96";
|
||||
}
|
||||
|
||||
void setBaud(unsigned long baud) {
|
||||
sendAT(GF("+IPR="), baud);
|
||||
}
|
||||
@@ -284,6 +285,14 @@ public:
|
||||
return false; // TODO: For now
|
||||
}
|
||||
|
||||
bool hasWifi() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasGPRS() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Power functions
|
||||
*/
|
||||
@@ -405,22 +414,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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user