Browse Source

Bugfixes.

pyserial_fix
Scott Petersen 11 years ago
parent
commit
e2f28478a4
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      pyad2usb/ad2usb.py
  2. +1
    -1
      pyad2usb/messages.py

+ 3
- 3
pyad2usb/ad2usb.py View File

@@ -419,16 +419,16 @@ class AD2USB(object):
msg = messages.LRRMessage(data)

args = (msg.partition, msg.event_type, msg.event_data)
if msg._event_type == 'ALARM_PANIC':
if msg.event_type == 'ALARM_PANIC':
self._panic_status = True
self.on_panic(True)

elif msg._event_type == 'CANCEL':
elif msg.event_type == 'CANCEL':
if self._panic_status == True:
self._panic_status = False
self.on_panic(False)

self.on_lrr_message(args)
self.on_lrr_message(msg)

return msg



+ 1
- 1
pyad2usb/messages.py View File

@@ -227,7 +227,7 @@ class LRRMessage(object):
"""
String conversion operator.
"""
return 'lrr > {0} @ {1} -- {2}'.format()
return 'lrr > {0} @ {1} -- {2}'.format(self.event_data, self.partition, self.event_type)

def _parse_message(self, data):
"""


Loading…
Cancel
Save