Browse Source

Add poweroff()

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
a58079bf86
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      TinyGsmClientSIM800.h

+ 7
- 0
TinyGsmClientSIM800.h View File

@ -256,6 +256,8 @@ public:
if (waitResponse(1000L, res) != 1) {
return "";
}
res.replace(GSM_NL "OK" GSM_NL, "");
res.replace(GSM_NL, "");
res.trim();
return res;
}
@ -280,6 +282,11 @@ public:
return init();
}
bool poweroff() {
sendAT(GF("+CPOWD=1"));
return waitResponse(GF("NORMAL POWER DOWN")) == 1;
}
bool radioOff() {
if (!autoBaud()) {
return false;


Loading…
Cancel
Save