Skip to content

Commit b7ace74

Browse files
committed
[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.
1 parent 73becba commit b7ace74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/seabreeze/pyseabreeze/devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def get_serial_number(self):
382382
return self.f.eeprom.eeprom_read_slot(0)
383383

384384
elif isinstance(protocol, OBPProtocol):
385-
serial_len = ord(protocol.query(0x00000101))
385+
serial_len = ord(protocol.query(0x00000101, timeout_ms=10_000))
386386
return protocol.query(0x00000100)[:serial_len].decode("utf8")
387387

388388
else:

0 commit comments

Comments
 (0)