more wiegand formats, and if binary is user supplied use that length, and ignore parity faults is removed since we wanna see all decodings anyway

This commit is contained in:
iceman1001 2021-04-27 15:19:34 +02:00
parent bbdb2d7c95
commit 10c9ea5f84
7 changed files with 213 additions and 116 deletions

View file

@ -156,14 +156,17 @@ static uint8_t get_length_from_header(wiegand_message_t *data) {
return len;
}
wiegand_message_t initialize_message_object(uint32_t top, uint32_t mid, uint32_t bot) {
wiegand_message_t initialize_message_object(uint32_t top, uint32_t mid, uint32_t bot, int n) {
wiegand_message_t result;
memset(&result, 0, sizeof(wiegand_message_t));
result.Top = top;
result.Mid = mid;
result.Bot = bot;
result.Length = get_length_from_header(&result);
if (n > 0)
result.Length = n;
else
result.Length = get_length_from_header(&result);
return result;
}