diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 36c0d4b..3c6fb7d 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -421,12 +421,12 @@ class AD2USB(object): args = (msg.partition, msg.event_type, msg.event_data) if msg._event_type == 'ALARM_PANIC': self._panic_status = True - self.on_panic(args + (True,)) + self.on_panic(True) elif msg._event_type == 'CANCEL': if self._panic_status == True: self._panic_status = False - self.on_panic(args + (False,)) + self.on_panic(False) self.on_lrr_message(args) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index f232ab5..1fecb33 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -271,7 +271,7 @@ class USBDevice(Device): if not no_reader_thread: self._read_thread.start() - self.on_open((self._serial_number, self._description)) + self.on_open() def close(self): """ @@ -489,7 +489,7 @@ class SerialDevice(Device): else: self._running = True - self.on_open(('N/A', "AD2SERIAL")) + self.on_open() if not no_reader_thread: self._read_thread.start() @@ -751,7 +751,7 @@ class SocketDevice(Device): else: self._running = True - self.on_open(('N/A', "AD2SOCKET")) + self.on_open() if not no_reader_thread: self._read_thread.start()