Commit b643d600 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Wait until thread ready

parent 2c6e5683
...@@ -17,6 +17,7 @@ class CamrasHpibDevice(object): ...@@ -17,6 +17,7 @@ class CamrasHpibDevice(object):
serial_port = serial.Serial("/dev/ttyUSB0") serial_port = serial.Serial("/dev/ttyUSB0")
CamrasHpibDevice.command_thread = serial.threaded.ReaderThread(serial_port, hpib.GPIBProtocol) CamrasHpibDevice.command_thread = serial.threaded.ReaderThread(serial_port, hpib.GPIBProtocol)
CamrasHpibDevice.command_thread.start() CamrasHpibDevice.command_thread.start()
CamrasHpibDevice.command_thread._connection_made.wait()
CamrasHpibDevice.command_thread.protocol.init_hpib() CamrasHpibDevice.command_thread.protocol.init_hpib()
@property @property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment