36-bit AWID (L11601 Lenel) (#1838)

* 36-bit AWID
* Rfid: correct vendor name AWIG -> AWID

Co-authored-by: Sergey Gavrilov <who.just.the.doctor@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Luke Williams 2022-10-12 11:31:54 -05:00 committed by GitHub
parent ede3bac799
commit 50dc2d7389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ static bool protocol_awid_can_be_decoded(uint8_t* data) {
// Avoid detection for invalid formats // Avoid detection for invalid formats
uint8_t len = bit_lib_get_bits(data, 8, 8); uint8_t len = bit_lib_get_bits(data, 8, 8);
if(len != 26 && len != 50 && len != 37 && len != 34) break; if(len != 26 && len != 50 && len != 37 && len != 34 && len != 36) break;
result = true; result = true;
} while(false); } while(false);
@ -207,7 +207,7 @@ bool protocol_awid_write_data(ProtocolAwid* protocol, void* data) {
// Fix incorrect length byte // Fix incorrect length byte
if(protocol->data[0] != 26 && protocol->data[0] != 50 && protocol->data[0] != 37 && if(protocol->data[0] != 26 && protocol->data[0] != 50 && protocol->data[0] != 37 &&
protocol->data[0] != 34) { protocol->data[0] != 34 && protocol->data[0] != 36 ) {
protocol->data[0] = 26; protocol->data[0] = 26;
} }
@ -232,7 +232,7 @@ bool protocol_awid_write_data(ProtocolAwid* protocol, void* data) {
const ProtocolBase protocol_awid = { const ProtocolBase protocol_awid = {
.name = "AWID", .name = "AWID",
.manufacturer = "AWIG", .manufacturer = "AWID",
.data_size = AWID_DECODED_DATA_SIZE, .data_size = AWID_DECODED_DATA_SIZE,
.features = LFRFIDFeatureASK, .features = LFRFIDFeatureASK,
.validate_count = 3, .validate_count = 3,