mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Some stream cleaning
This commit is contained in:
@@ -675,6 +675,7 @@ public:
|
|||||||
bool commandMode(int retries = 2) {
|
bool commandMode(int retries = 2) {
|
||||||
int triesMade = 0;
|
int triesMade = 0;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
streamClear(); // Empty everything in the buffer before starting
|
||||||
while (!success and triesMade < retries) {
|
while (!success and triesMade < retries) {
|
||||||
// Cannot send anything for 1 "guard time" before entering command mode
|
// Cannot send anything for 1 "guard time" before entering command mode
|
||||||
// Default guard time is 1s, but the init fxn decreases it to 250 ms
|
// Default guard time is 1s, but the init fxn decreases it to 250 ms
|
||||||
|
|||||||
Reference in New Issue
Block a user