Code cleanup
This commit is contained in:
parent
a9f7638c14
commit
0920df1fb0
@ -67,7 +67,7 @@ class DoorController:
|
|||||||
uids.add(token["token"]["uid_hash"].strip())
|
uids.add(token["token"]["uid_hash"].strip())
|
||||||
self.uids = uids
|
self.uids = uids
|
||||||
|
|
||||||
def wiegand_callback(self, bits, value):
|
def wiegand_callback(self, value):
|
||||||
uid_hash = hash_uid(value, self.uid_salt)
|
uid_hash = hash_uid(value, self.uid_salt)
|
||||||
logging.debug(f"hash {uid_hash}")
|
logging.debug(f"hash {uid_hash}")
|
||||||
if uid_hash in self.uids:
|
if uid_hash in self.uids:
|
||||||
|
@ -130,7 +130,7 @@ class Decoder:
|
|||||||
if self.bits >= 26:
|
if self.bits >= 26:
|
||||||
hex = self.get_hex()
|
hex = self.get_hex()
|
||||||
if hex:
|
if hex:
|
||||||
self.callback(self.bits, hex)
|
self.callback(hex)
|
||||||
else:
|
else:
|
||||||
logging.error(f"Expected 26 bits, but got {self.bits:d}: {self.items}")
|
logging.error(f"Expected 26 bits, but got {self.bits:d}: {self.items}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user