From 7c042ef3eddbc3351e61226774ecd8c6b2875066 Mon Sep 17 00:00:00 2001 From: Adam Boardman Date: Thu, 17 Dec 2020 14:35:57 +0000 Subject: [PATCH] Changed reading code to take responses entire blocks at a time --- codi-app/SerialPortManager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codi-app/SerialPortManager.py b/codi-app/SerialPortManager.py index 7b2e441..22f362d 100644 --- a/codi-app/SerialPortManager.py +++ b/codi-app/SerialPortManager.py @@ -88,6 +88,8 @@ def uploadReadFromSerial(): print('[230400]Listening...') while isRunning: uploadResponse = socket.read() + if socket.in_waiting > 0: + uploadResponse += socket.read(socket.in_waiting) print('[230400]Response', uploadResponse)