Browse Source

Fixed ids.

pyserial_fix
Scott Petersen 12 years ago
parent
commit
e2b91dea05
2 changed files with 16 additions and 0 deletions
  1. +4
    -0
      pyad2usb/ad2usb.py
  2. +12
    -0
      pyad2usb/devices.py

+ 4
- 0
pyad2usb/ad2usb.py View File

@@ -202,6 +202,10 @@ class AD2USB(object):
self._device.close()
self._device = None

@property
def id(self):
return self._device.id

def _wire_events(self):
"""
Wires up the internal device events.


+ 12
- 0
pyad2usb/devices.py View File

@@ -168,6 +168,10 @@ class USBDevice(Device):

self.on_close()

@property
def id(self):
return self._id

def is_reader_alive(self):
"""
Indicates whether or not the reader thread is alive.
@@ -324,6 +328,10 @@ class SerialDevice(Device):

self.on_close()

@property
def id(self):
return self._id

def is_reader_alive(self):
"""
Indicates whether or not the reader thread is alive.
@@ -458,6 +466,10 @@ class SocketDevice(Device):

self.on_close()

@property
def id(self):
return self._id

def is_reader_alive(self):
"""
Indicates whether or not the reader thread is alive.


Loading…
Cancel
Save