mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Leave airplane mode on in disconnect
This commit is contained in:
@@ -767,6 +767,8 @@ public:
|
|||||||
XBEE_COMMAND_START_DECORATOR(5, false)
|
XBEE_COMMAND_START_DECORATOR(5, false)
|
||||||
sendAT(GF("AN"), apn); // Set the APN
|
sendAT(GF("AN"), apn); // Set the APN
|
||||||
bool success = waitResponse() == 1;
|
bool success = waitResponse() == 1;
|
||||||
|
sendAT(GF("AM0")); // Airplane mode off
|
||||||
|
waitResponse(5000);
|
||||||
writeChanges();
|
writeChanges();
|
||||||
XBEE_COMMAND_END_DECORATOR
|
XBEE_COMMAND_END_DECORATOR
|
||||||
return success;
|
return success;
|
||||||
@@ -777,9 +779,9 @@ public:
|
|||||||
sendAT(GF("AM1")); // Cheating and disconnecting by turning on airplane mode
|
sendAT(GF("AM1")); // Cheating and disconnecting by turning on airplane mode
|
||||||
int8_t res = (1 == waitResponse(5000));
|
int8_t res = (1 == waitResponse(5000));
|
||||||
writeChanges();
|
writeChanges();
|
||||||
sendAT(GF("AM0")); // Airplane mode off
|
// sendAT(GF("AM0")); // Airplane mode off
|
||||||
waitResponse(5000);
|
// waitResponse(5000);
|
||||||
writeChanges();
|
// writeChanges();
|
||||||
XBEE_COMMAND_END_DECORATOR
|
XBEE_COMMAND_END_DECORATOR
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user