Browse Source

Fixed an issue with not saving the last zone fault correctly. Fixed wrong constant use.

pyserial_fix
Scott Petersen 11 years ago
parent
commit
25f0604a8f
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      pyad2usb/zonetracking.py

+ 4
- 3
pyad2usb/zonetracking.py View File

@@ -54,7 +54,7 @@ class Zonetracker(object):
zone = -1

if isinstance(message, messages.ExpanderMessage):
if message.type == messages.ExpanderMessage.EXPANDER:
if message.type == messages.ExpanderMessage.ZONE:
zone = self._expander_to_zone(int(message.address), int(message.channel))

status = Zone.CLEAR
@@ -99,8 +99,9 @@ class Zonetracker(object):
self._zones_faulted.append(zone)
self._zones_faulted.sort()

# Save our spot for the next message.
self._last_zone_fault = zone
# Save our spot for the next message.
self._last_zone_fault = zone

self._clear_expired_zones()

def _clear_zones(self, zone):


Loading…
Cancel
Save