From b7ace7490d9c2d384d17e388625af337ae28217b Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sun, 26 Sep 2021 11:06:30 +0200 Subject: [PATCH] [pyseabreeze] increase timeout in first get_serial_number call Test if increasing the timeout for the first read after a spectrometer is opened helps with getting the HDX to work reliably under Linux. See #133. --- src/seabreeze/pyseabreeze/devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seabreeze/pyseabreeze/devices.py b/src/seabreeze/pyseabreeze/devices.py index 3b419e5c..ddc918db 100644 --- a/src/seabreeze/pyseabreeze/devices.py +++ b/src/seabreeze/pyseabreeze/devices.py @@ -382,7 +382,7 @@ def get_serial_number(self): return self.f.eeprom.eeprom_read_slot(0) elif isinstance(protocol, OBPProtocol): - serial_len = ord(protocol.query(0x00000101)) + serial_len = ord(protocol.query(0x00000101, timeout_ms=10_000)) return protocol.query(0x00000100)[:serial_len].decode("utf8") else: