From def01ec0a90ca7d2eb660b4a537e661587167114 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 15 Aug 2017 23:15:22 +0200 Subject: Fix print of protection level Fixes issue #20 --- src/etianalyse.cpp | 6 ++++-- src/fig0_1.cpp | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/etianalyse.cpp b/src/etianalyse.cpp index af7959a..c457085 100644 --- a/src/etianalyse.cpp +++ b/src/etianalyse.cpp @@ -559,10 +559,12 @@ void ETI_Analyser::eti_analyse() switch (subch.protection_type) { case ensemble_database::subchannel_t::protection_type_t::EEP: if (subch.protection_option == 0) { - fprintf(stat_fd, " protection: EEP %d-A\n", subch.protection_level); + fprintf(stat_fd, " protection: EEP %d-A\n", + subch.protection_level + 1); } else if (subch.protection_option == 0) { - fprintf(stat_fd, " protection: EEP %d-B\n", subch.protection_level); + fprintf(stat_fd, " protection: EEP %d-B\n", + subch.protection_level + 1); } else { fprintf(stat_fd, " protection: unknown\n"); diff --git a/src/fig0_1.cpp b/src/fig0_1.cpp index 4f35b75..74babbd 100644 --- a/src/fig0_1.cpp +++ b/src/fig0_1.cpp @@ -75,8 +75,7 @@ fig_result_t fig0_1(fig0_common_t& fig0, const display_settings_t &disp) int option = (f[i+2] >> 4) & 0x07; int protection_level = (f[i+2] >> 2) & 0x03; int subchannel_size = ((f[i+2] & 0x03) << 8 ) | - f[i+3]; - + f[i+3]; i += 4; r.msgs.push_back(strprintf("Subch 0x%x", subch_id)); -- cgit v1.2.3