diff --git a/lib/m17_coder_impl.cc b/lib/m17_coder_impl.cc index 1228374..bba848a 100644 --- a/lib/m17_coder_impl.cc +++ b/lib/m17_coder_impl.cc @@ -197,12 +197,14 @@ void m17_coder_impl::set_type(short type) //increment the Frame Number _fn = (_fn + 1) % 0x8000; + + //increment the LICH counter + lich_cnt = (lich_cnt + 1) % 6; } else //LSF { _got_lsf=1; -// printf("got_lsf=1\n"); //send out the preamble and LSF send_preamble(frame_buff_tmp, &frame_buff_count_tmp, 0); //0 - LSF preamble, as opposed to 1 - BERT preamble diff --git a/lib/m17_decoder_impl.cc b/lib/m17_decoder_impl.cc index 0931903..fd7a353 100644 --- a/lib/m17_decoder_impl.cc +++ b/lib/m17_decoder_impl.cc @@ -171,7 +171,10 @@ namespace gr { } //decode - uint32_t e=viterbi_decode_punctured(frame_data, enc_data, puncture_pattern_2, 272, 12); + #ifdef SHOW_VITERBI_ERRS + uint32_t e= + #endif + viterbi_decode_punctured(frame_data, enc_data, puncture_pattern_2, 272, 12); uint16_t fn = (frame_data[1] << 8) | frame_data[2]; @@ -274,7 +277,11 @@ namespace gr { printf("LSF\n"); } //decode - uint32_t e=viterbi_decode_punctured(lsf, d_soft_bit, puncture_pattern_1, 2*SYM_PER_PLD, 61); + #ifdef SHOW_VITERBI_ERRS + uint32_t e= + #endif + viterbi_decode_punctured(lsf, d_soft_bit, puncture_pattern_1, 2*SYM_PER_PLD, 61); + //shift the buffer 1 position left - get rid of the encoded flushing bits for(uint8_t i=0; i<30; i++)