From 14f21d7d029782618928436ac38fd31e058bba29 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Thu, 8 Dec 2016 14:09:48 +0200 Subject: [PATCH] Small fixes --- TinyGsmClient.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TinyGsmClient.h b/TinyGsmClient.h index 385f148..85bee6c 100644 --- a/TinyGsmClient.h +++ b/TinyGsmClient.h @@ -536,11 +536,11 @@ private: } int streamRead() { return stream.read(); } - void streamReadAll() { while(stream.available()) { stream.read(); } } template void sendAT(Args... cmd) { streamWrite("AT", cmd..., GSM_NL); + stream.flush(); //DBG("### AT:", cmd...); } @@ -555,7 +555,7 @@ private: for (unsigned long start = millis(); millis() - start < timeout; ) { while (stream.available() > 0) { int a = streamRead(); - if (a <= 0) continue; + if (a <= 0) continue; // Skip 0x00 bytes, just in case data += (char)a; if (r1 && data.indexOf(r1) >= 0) { index = 1;