Add poweroff()
This commit is contained in:
@@ -256,6 +256,8 @@ public:
|
|||||||
if (waitResponse(1000L, res) != 1) {
|
if (waitResponse(1000L, res) != 1) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
res.replace(GSM_NL "OK" GSM_NL, "");
|
||||||
|
res.replace(GSM_NL, "");
|
||||||
res.trim();
|
res.trim();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -280,6 +282,11 @@ public:
|
|||||||
return init();
|
return init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool poweroff() {
|
||||||
|
sendAT(GF("+CPOWD=1"));
|
||||||
|
return waitResponse(GF("NORMAL POWER DOWN")) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
bool radioOff() {
|
bool radioOff() {
|
||||||
if (!autoBaud()) {
|
if (!autoBaud()) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user