Skip to content

Commit

Permalink
[pyseabreeze] increase timeout in first get_serial_number call
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ap-- committed Sep 26, 2021
1 parent 73becba commit b7ace74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seabreeze/pyseabreeze/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b7ace74

Please sign in to comment.