From a7b842727ad11314f2f7ea05c6e07006df10a552 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Fri, 29 Jun 2018 18:20:55 +0000 Subject: Added additional options for ootx decoding --- src/ootx_decoder.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ootx_decoder.c') diff --git a/src/ootx_decoder.c b/src/ootx_decoder.c index 7d45626..e110d11 100644 --- a/src/ootx_decoder.c +++ b/src/ootx_decoder.c @@ -37,6 +37,7 @@ void ootx_init_decoder_context(ootx_decoder_context *ctx) { ctx->preamble = 0XFFFFFFFF; ctx->bits_processed = 0; ctx->found_preamble = 0; + ctx->ignore_sync_bit_error = 0; ctx->buffer = (uint8_t*)malloc(MAX_BUFF_SIZE); ctx->payload_size = (uint16_t*)ctx->buffer; @@ -122,9 +123,11 @@ void ootx_pump_bit(ootx_decoder_context *ctx, uint8_t dbit) { // printf("drop %d\n", dbit); if( !dbit ) { - //printf("Bad sync bit\n"); + // printf("Bad sync bit\n"); ootx_error(ctx, "OOTX Decoder: Bad sync bit"); - ootx_reset_buffer(ctx); + + if (ctx->ignore_sync_bit_error == 0) + ootx_reset_buffer(ctx); } ctx->bits_processed = 0; } -- cgit v1.2.3