- status = m.group(1)
- if status == "opened":
- status_tracker.doorOpen(last_who, last_how)
- if status == "closed":
- status_tracker.doorClosed(last_who, last_how)
- last_who = None
- last_how = None
+ (status, current_operation, ajar_status) = m.group(1,2,3)
+ #REALLY: doorOpen/Closed should be called before doorLocked/Unlocked
+ if ajar_status == "ajar":
+ status_tracker.doorOpen()
+ else:
+ status_tracker.doorClosed()
+ if current_operation == "idle":
+ if status == "opened":
+ status_tracker.doorUnlocked(last_who, last_how)
+ if status == "closed":
+ status_tracker.doorLocked(last_who, last_how)
+ last_who = None
+ last_how = None