We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a2fb31 commit 12a8e63Copy full SHA for 12a8e63
microscope/stages/linkam.py
@@ -1169,7 +1169,9 @@ def init_usb(self, uid):
1169
# suggest that an OpenComms message should open a connection to the
1170
# device with that serial number; with only one stage attached, it
1171
# appears that OpenComms ignores the value of serialNumber.
1172
- if not isinstance(uid, bytes):
+ if uid is None:
1173
+ uid = b''
1174
+ elif not isinstance(uid, bytes):
1175
uid = uid.encode()
1176
self._lib.linkamInitialiseUSBCommsInfo(byref(self._commsinfo), ctypes.c_char_p(uid))
1177
0 commit comments