doorcontrol: Fix setting is_26bit in hid.Credential.from_code()

This commit is contained in:
Adam Goldsmith 2024-12-06 02:09:50 -05:00
parent b4329a5b77
commit 86b1ac42b2

View File

@ -43,7 +43,7 @@ class Credential:
) )
bits[6] = cls.even_parity(bits) bits[6] = cls.even_parity(bits)
bits[31] = cls.odd_parity(bits) bits[31] = cls.odd_parity(bits)
return cls(bitstring.Bits(bits)) return cls(bitstring.Bits(bits), is_26bit=True)
@classmethod @classmethod
def from_26bit_hex(cls, hex_code: str) -> "Credential": def from_26bit_hex(cls, hex_code: str) -> "Credential":