Merge pull request #389 from adrianca88/set_phone_functionality
Added setPhoneFunctionality method
This commit is contained in:
@@ -233,8 +233,7 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
|
||||
}
|
||||
|
||||
bool radioOffImpl() {
|
||||
sendAT(GF("+CFUN=4"));
|
||||
if (waitResponse(10000L) != 1) { return false; }
|
||||
if (!setPhoneFunctionality(4)) { return false; }
|
||||
delay(3000);
|
||||
return true;
|
||||
}
|
||||
@@ -244,6 +243,11 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
|
||||
return waitResponse() == 1;
|
||||
}
|
||||
|
||||
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) {
|
||||
sendAT(GF("+CFUN="), fun, reset ? ",1" : "");
|
||||
return waitResponse(10000L) == 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic network functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user