Browse Source

Modified the previously-moved panel_message.py in accordance with pull #12.

pyserial_fix
Scott Petersen 7 years ago
parent
commit
9cd88abea0
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      alarmdecoder/messages/panel_message.py

+ 3
- 2
alarmdecoder/messages/panel_message.py View File

@@ -69,6 +69,9 @@ class Message(BaseMessage):
panel_data = None
"""The panel data field associated with this message."""


_regex = re.compile('^(!KPM:){0,1}(\[[a-fA-F0-9\-]+\]),([a-fA-F0-9]+),(\[[a-fA-F0-9]+\]),(".+")$')

def __init__(self, data=None):
"""
Constructor
@@ -78,8 +81,6 @@ class Message(BaseMessage):
"""
BaseMessage.__init__(self, data)

self._regex = re.compile('^(!KPM:){0,1}(\[[a-fA-F0-9\-]+\]),([a-fA-F0-9]+),(\[[a-fA-F0-9]+\]),(".+")$')

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



Loading…
Cancel
Save