mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Added virtual master class
This commit is contained in:
@@ -40,7 +40,7 @@ enum RegStatus {
|
||||
};
|
||||
|
||||
|
||||
class TinyGsmUBLOX
|
||||
class TinyGsmUBLOX : public TinyGsmMasterModem
|
||||
{
|
||||
|
||||
public:
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
#else
|
||||
TinyGsmUBLOX(Stream& stream)
|
||||
#endif
|
||||
: stream(stream)
|
||||
: TinyGsmMasterModem(stream), stream(stream)
|
||||
{
|
||||
memset(sockets, 0, sizeof(sockets));
|
||||
}
|
||||
@@ -485,6 +485,10 @@ public:
|
||||
return localIP() != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* IP Address functions
|
||||
*/
|
||||
|
||||
String getLocalIP() {
|
||||
sendAT(GF("+UPSND=0,0"));
|
||||
if (waitResponse(GF(GSM_NL "+UPSND:")) != 1) {
|
||||
@@ -499,10 +503,6 @@ public:
|
||||
return res;
|
||||
}
|
||||
|
||||
IPAddress localIP() {
|
||||
return TinyGsmIpFromString(getLocalIP());
|
||||
}
|
||||
|
||||
/*
|
||||
* Messaging functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user