From 6ad28759408695a4825738bcc32bc294d1869ca8 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Sun, 12 Feb 2017 11:09:38 -0500 Subject: handler for bad crc32 --- tools/ootx_decode/ootx_decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/ootx_decode/ootx_decoder.c') diff --git a/tools/ootx_decode/ootx_decoder.c b/tools/ootx_decode/ootx_decoder.c index 36f93fe..dc5d50a 100644 --- a/tools/ootx_decode/ootx_decoder.c +++ b/tools/ootx_decode/ootx_decoder.c @@ -16,7 +16,7 @@ #define MAX_BUFF_SIZE 1024 void (*ootx_packet_clbk)(ootx_packet* packet) = NULL; -void (*ootx_bad_crc_clbk)(ootx_packet* packet) = NULL; +void (*ootx_bad_crc_clbk)(ootx_packet* packet, uint32_t crc) = NULL; void ootx_pump_bit(ootx_decoder_context *ctx, uint8_t dbit); @@ -194,7 +194,7 @@ void ootx_pump_bit(ootx_decoder_context *ctx, uint8_t dbit) { crc = crc32( crc, op.data,op.length); if (crc != op.crc32) { - if (ootx_bad_crc_clbk != NULL) ootx_bad_crc_clbk(&op); + if (ootx_bad_crc_clbk != NULL) ootx_bad_crc_clbk(&op,crc); } else if (ootx_packet_clbk != NULL) { ootx_packet_clbk(&op); -- cgit v1.2.3