handle Wiegand 8-bit keys (#4837)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb 2023-05-16 14:30:14 -07:00 committed by Jesse Hills
parent cc76e5353c
commit c941bc4109
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -102,6 +102,16 @@ void Wiegand::loop() {
uint8_t key = KEYS[value];
this->send_key_(key);
}
} else if (count == 8) {
if ((value ^ 0xf0) >> 4 == (value & 0xf)) {
value &= 0xf;
for (auto *trigger : this->key_triggers_)
trigger->trigger(value);
if (value < 12) {
uint8_t key = KEYS[value];
this->send_key_(key);
}
}
} else {
ESP_LOGD(TAG, "received unknown %d-bit value: %llx", count, value);
}