From ea70b9953faaf9155b60400e306c71432a049d94 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 9 Oct 2018 15:27:35 +0200 Subject: Add -e option --- src/etianalyse.cpp | 74 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 35 deletions(-) (limited to 'src/etianalyse.cpp') diff --git a/src/etianalyse.cpp b/src/etianalyse.cpp index df7eca0..8ba1924 100644 --- a/src/etianalyse.cpp +++ b/src/etianalyse.cpp @@ -458,25 +458,27 @@ void ETI_Analyser::eti_analyse() strprintf("Mismatch: %04x %04x", crc, figcrc)); } - printvalue("FIGs", 3); - - bool endmarker = false; - int figcount = 0; - while (!endmarker) { - uint8_t figtype, figlen; - figtype = (fig[0] & 0xE0) >> 5; - if (figtype != 7) { - figlen = fig[0] & 0x1F; - - printsequencestart(4); - decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); - fig += figlen + 1; - figcount += figlen + 1; - if (figcount >= 29) + if (crccorrect or config.ignore_error) { + printvalue("FIGs", 3); + + bool endmarker = false; + int figcount = 0; + while (!endmarker) { + uint8_t figtype, figlen; + figtype = (fig[0] & 0xE0) >> 5; + if (figtype != 7) { + figlen = fig[0] & 0x1F; + + printsequencestart(4); + decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); + fig += figlen + 1; + figcount += figlen + 1; + if (figcount >= 29) + endmarker = true; + } + else { endmarker = true; - } - else { - endmarker = true; + } } } @@ -698,26 +700,28 @@ void ETI_Analyser::fic_analyse() strprintf("Mismatch: %04x %04x", crc, figcrc)); } - printvalue("FIGs", 3); + if (crccorrect or config.ignore_error) { + printvalue("FIGs", 3); - uint8_t *fig = fib; - bool endmarker = false; - int figcount = 0; - while (!endmarker) { - uint8_t figtype, figlen; - figtype = (fig[0] & 0xE0) >> 5; - if (figtype != 7) { - figlen = fig[0] & 0x1F; + uint8_t *fig = fib; + bool endmarker = false; + int figcount = 0; + while (!endmarker) { + uint8_t figtype, figlen; + figtype = (fig[0] & 0xE0) >> 5; + if (figtype != 7) { + figlen = fig[0] & 0x1F; - printsequencestart(4); - decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); - fig += figlen + 1; - figcount += figlen + 1; - if (figcount >= 29) + printsequencestart(4); + decodeFIG(config, figs, fig+1, figlen, figtype, 5, crccorrect); + fig += figlen + 1; + figcount += figlen + 1; + if (figcount >= 29) + endmarker = true; + } + else { endmarker = true; - } - else { - endmarker = true; + } } } -- cgit v1.2.3