diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-08-15 23:15:22 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-08-15 23:15:22 +0200 |
commit | def01ec0a90ca7d2eb660b4a537e661587167114 (patch) | |
tree | 14dd919a8a66e5acd59e390894dd818a97ca140c /src | |
parent | b798cb803497cb9d60918fe1d6153696b364b07d (diff) | |
download | etisnoop-def01ec0a90ca7d2eb660b4a537e661587167114.tar.gz etisnoop-def01ec0a90ca7d2eb660b4a537e661587167114.tar.bz2 etisnoop-def01ec0a90ca7d2eb660b4a537e661587167114.zip |
Fix print of protection level
Fixes issue #20
Diffstat (limited to 'src')
-rw-r--r-- | src/etianalyse.cpp | 6 | ||||
-rw-r--r-- | src/fig0_1.cpp | 3 |
2 files changed, 5 insertions, 4 deletions
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)); |