From 716927aefb2153c7d96e3586c8c85b2f8f7b2606 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Wed, 5 Jun 2013 20:52:08 -0700 Subject: [PATCH] Fixed a couple issues so the previous rework will function. Test code. --- pyad2usb/devices.py | 4 +++- pyftdi | 2 +- test.py | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index b9d2b10..119ae1b 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -31,7 +31,7 @@ class Device(object): self._interface = None self._device = None self._running = False - self._read_thread = ReadThread(self) # NOTE: not sure this is going to work.. + self._read_thread = Device.ReadThread(self) # NOTE: not sure this is going to work.. def __del__(self): pass @@ -432,6 +432,8 @@ class SocketDevice(Device): """ Constructor """ + Device.__init__(self) + self._interface = interface self._host, self._port = interface diff --git a/pyftdi b/pyftdi index e58079b..0c3e671 120000 --- a/pyftdi +++ b/pyftdi @@ -1 +1 @@ -../../pyftdi/pyftdi/ \ No newline at end of file +../pyftdi/pyftdi \ No newline at end of file diff --git a/test.py b/test.py index 038cbeb..8ed297d 100755 --- a/test.py +++ b/test.py @@ -199,7 +199,7 @@ def test_factory_watcher(): overseer.close() def test_socket(): - dev = pyad2usb.ad2usb.devices.SocketDevice(interface=("localhost", 10000)) + dev = pyad2usb.ad2usb.devices.SocketDevice(interface=("singularity.corp.nutech.com", 10000)) a2u = pyad2usb.ad2usb.AD2USB(dev) a2u.on_open += handle_open @@ -281,7 +281,7 @@ try: signal.signal(signal.SIGINT, signal_handler) #test_serial() - upload_serial() + #upload_serial() #test_usb() #test_usb_serial() @@ -290,7 +290,7 @@ try: #upload_usb() #upload_usb_serial() - #test_socket() + test_socket() #upload_socket() #test_no_read_thread()