|
|
@ -644,9 +644,13 @@ public: |
|
|
|
streamWrite(tail...); |
|
|
|
} |
|
|
|
|
|
|
|
bool streamSkipUntil(char c) { //TODO: timeout |
|
|
|
while (true) { |
|
|
|
while (!stream.available()) { TINY_GSM_YIELD(); } |
|
|
|
bool streamSkipUntil(char c) { |
|
|
|
const unsigned long timeout = 1000L; |
|
|
|
unsigned long startMillis = millis(); |
|
|
|
while (millis() - startMillis < timeout) { |
|
|
|
while (millis() - startMillis < timeout && !stream.available()) { |
|
|
|
TINY_GSM_YIELD(); |
|
|
|
} |
|
|
|
if (stream.read() == c) |
|
|
|
return true; |
|
|
|
} |
|
|
|