Browse Source

Test

pyserial_fix
Scott Petersen 11 years ago
parent
commit
768721ab1e
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      pyad2usb/ad2usb.py

+ 12
- 1
pyad2usb/ad2usb.py View File

@@ -240,7 +240,7 @@ class Message(object):
Represents a message from the alarm panel.
"""

def __init__(self):
def __init__(self, data=None):
"""
Constructor
"""
@@ -261,6 +261,17 @@ class Message(object):
self._cursor = -1
self._raw = ""

if data is not None:
self._parse_message(data)

def _parse_message(self, data):
pattern = '("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*)'




pass

@property
def ignore_packet(self):
"""


Loading…
Cancel
Save