Skip to content

Commit 8e662d4

Browse files
committed
revert reads for samd51 uart
1 parent fd2377f commit 8e662d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_espatcontrol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def send(self, buffer, timeout=1):
190190
response = b''
191191
while (time.monotonic() - stamp) < timeout:
192192
if self._uart.in_waiting:
193-
response += self._uart.read(1)
193+
response += self._uart.read(self._uart.in_waiting)
194194
if response[-9:] == b'SEND OK\r\n':
195195
break
196196
if response[-7:] == b'ERROR\r\n':
@@ -324,7 +324,7 @@ def at_response(self, at_cmd, timeout=5, retries=3):
324324
response = b''
325325
while (time.monotonic() - stamp) < timeout:
326326
if self._uart.in_waiting:
327-
response += self._uart.read(1)
327+
response += self._uart.read(self._uart.in_waiting)
328328
if response[-4:] == b'OK\r\n':
329329
break
330330
if response[-7:] == b'ERROR\r\n':

0 commit comments

Comments
 (0)