From f6a03e6b7e6fb0a4db627ec2a475282de915e450 Mon Sep 17 00:00:00 2001 From: SRGDamia1 Date: Tue, 20 Feb 2018 21:06:05 -0500 Subject: [PATCH] Some stream cleaning --- src/TinyGsmClientXBee.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index 86124d1..74a8703 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -675,6 +675,7 @@ public: bool commandMode(int retries = 2) { int triesMade = 0; bool success = false; + streamClear(); // Empty everything in the buffer before starting while (!success and triesMade < retries) { // 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