From 86b1ac42b22330e5bf1a46424c5adeb6a7d5fd65 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 6 Dec 2024 02:09:50 -0500 Subject: [PATCH] doorcontrol: Fix setting is_26bit in hid.Credential.from_code() --- doorcontrol/hid/Credential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorcontrol/hid/Credential.py b/doorcontrol/hid/Credential.py index a05a557..e38703b 100644 --- a/doorcontrol/hid/Credential.py +++ b/doorcontrol/hid/Credential.py @@ -43,7 +43,7 @@ class Credential: ) bits[6] = cls.even_parity(bits) bits[31] = cls.odd_parity(bits) - return cls(bitstring.Bits(bits)) + return cls(bitstring.Bits(bits), is_26bit=True) @classmethod def from_26bit_hex(cls, hex_code: str) -> "Credential":