From 03bad8fff666870185758c8c30383769405e0430 Mon Sep 17 00:00:00 2001 From: Pascal <engelerp@phys.ethz.ch> Date: Fri, 30 Aug 2024 08:43:52 +0200 Subject: [PATCH] Adjusted timeout --- stitch_project/api/Stitch/Stitch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stitch_project/api/Stitch/Stitch.py b/stitch_project/api/Stitch/Stitch.py index a026b5b..30601e2 100644 --- a/stitch_project/api/Stitch/Stitch.py +++ b/stitch_project/api/Stitch/Stitch.py @@ -37,7 +37,7 @@ class Stitch: self.baudRate = baudRate self.numFreqs = 1023 if self.alwaysOpen: - self.serialHandle = serial.Serial(self.serialPort, self.baudRate, bytesize=8, stopbits=1, timeout=1) + self.serialHandle = serial.Serial(self.serialPort, self.baudRate, bytesize=8, stopbits=1, timeout=10) #public interface starts here def setFrequencies(self, dphis): @@ -86,7 +86,7 @@ class Stitch: self._sendArray(arr) #now read until timeout if not self.alwaysOpen: - self.serialHandle = serial.Serial(self.serialPort, self.baudRate, bytesize=8, stopbits=1, timeout=5) + self.serialHandle = serial.Serial(self.serialPort, self.baudRate, bytesize=8, stopbits=1, timeout=10) data = self.serialHandle.read(20*self.numFreqs) if not self.alwaysOpen: self.close() -- GitLab