From 4bc1c0cf3e8c5dcc72a4bf971f0b78bbbe35cc57 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 9 Oct 2018 11:09:12 +0200 Subject: Add some FIG2 parsing --- src/etianalyse.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/etianalyse.cpp') diff --git a/src/etianalyse.cpp b/src/etianalyse.cpp index 1b4c5a2..df7eca0 100644 --- a/src/etianalyse.cpp +++ b/src/etianalyse.cpp @@ -801,15 +801,12 @@ void ETI_Analyser::decodeFIG( break; case 2: {// EXTENDED LABELS - uint16_t ext,oe; - - uint8_t toggle_flag = (f[0] & 0x80) >> 7; - uint8_t segment_index = (f[0] & 0x70) >> 4; - oe = (f[0] & 0x08) >> 3; - ext = f[0] & 0x07; - + const uint16_t ext = f[0] & 0x07; const display_settings_t disp(config.is_fig_to_be_printed(figtype, ext), indent); + fig2_common_t fig2(ensemble, f, figlen); + auto fig_result = fig2_select(fig2, disp); + printvalue("FIG", disp, "", strprintf("2/%d", ext)); if (get_verbosity() > 0) { @@ -818,12 +815,12 @@ void ETI_Analyser::decodeFIG( if (disp.print) { printvalue("Length", disp, "", to_string(figlen)); - printvalue("OE", disp, "", to_string(oe)); - printvalue("Toggle flag", disp, "", to_string(toggle_flag)); - printvalue("Segment index", disp, "", to_string(segment_index)); + printvalue("RFU", disp, "", to_string(fig2.rfu())); + printvalue("Toggle flag", disp, "", to_string(fig2.toggle_flag())); + printvalue("Segment index", disp, "", to_string(fig2.segment_index())); } - figs.push_back(figtype, ext, figlen); + figs.push_back(figtype, fig2.ext(), figlen); bool complete = true; rate_announce_fig(figtype, ext, complete); -- cgit v1.2.3