Browse Source

Fixed a couple issues so the previous rework will function. Test code.

pyserial_fix
Scott Petersen 12 years ago
parent
commit
716927aefb
3 changed files with 7 additions and 5 deletions
  1. +3
    -1
      pyad2usb/devices.py
  2. +1
    -1
      pyftdi
  3. +3
    -3
      test.py

+ 3
- 1
pyad2usb/devices.py View File

@@ -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



+ 1
- 1
pyftdi View File

@@ -1 +1 @@
../../pyftdi/pyftdi/
../pyftdi/pyftdi

+ 3
- 3
test.py View File

@@ -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()


Loading…
Cancel
Save