projects
/
svn42.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
--bug, physically present was not set on manual open/close -> light
[svn42.git]
/
track-presence.py
diff --git
a/track-presence.py
b/track-presence.py
index
0b25f32
..
f9bdaa4
100755
(executable)
--- a/
track-presence.py
+++ b/
track-presence.py
@@
-317,11
+317,7
@@
class StatusTracker: #(threading.Thread):
self.updateWhoMightBeHere(who)
self.lock.acquire()
self.door_manual_switch_used=(who is None or len(who) == 0)
self.updateWhoMightBeHere(who)
self.lock.acquire()
self.door_manual_switch_used=(who is None or len(who) == 0)
- if how is None:
- #propably used tuerctl remote interface
- self.door_physically_present = False
- else:
- self.door_physically_present=(self.door_manual_switch_used or how.startswith("Card"))
+ self.door_physically_present=(self.door_manual_switch_used or (not how is None and how.startswith("Card")))
if not self.door_open_previously is None:
self.last_door_operation_unixts=time.time()
self.lock.release()
if not self.door_open_previously is None:
self.last_door_operation_unixts=time.time()
self.lock.release()
@@
-341,11
+337,7
@@
class StatusTracker: #(threading.Thread):
self.updateWhoMightBeHere(who)
self.lock.acquire()
self.door_manual_switch_used=(who is None or len(who) == 0)
self.updateWhoMightBeHere(who)
self.lock.acquire()
self.door_manual_switch_used=(who is None or len(who) == 0)
- if how is None:
- #propably used tuerctl remote interface
- self.door_physically_present = False
- else:
- self.door_physically_present=(self.door_manual_switch_used or how.startswith("Card"))
+ self.door_physically_present=(self.door_manual_switch_used or (not how is None and how.startswith("Card")))
if not self.door_open_previously is None:
self.last_door_operation_unixts=time.time()
self.lock.release()
if not self.door_open_previously is None:
self.last_door_operation_unixts=time.time()
self.lock.release()