diff --git a/lib/rds_decoder_redsea_impl.cc b/lib/rds_decoder_redsea_impl.cc index 003807f..3493b93 100644 --- a/lib/rds_decoder_redsea_impl.cc +++ b/lib/rds_decoder_redsea_impl.cc @@ -58,16 +58,12 @@ namespace gr { dout << "constructing error lookup table"< 0) { - //~ dout<<"found sy 14 offset A in table"< 0) { + // dout<<"found sy 14 offset A in table"<, uint32_t> rds_decoder_redsea_impl::makeError static const unsigned int offset_word[5]={252,408,360,436,848}; static const unsigned int syndrome[5]={383,14,303,663,748}; static const char * const offset_name[]={"A","B","C","D","c"};*/ + +//const std::vector offset_words ={0x0FC, 0x198, 0x168, 0x350, 0x1B4}; for (uint8_t offset_num=0;offset_num<5;offset_num++) { + //dout<<"name:" <(errvec) < 0) { uint32_t err = kErrorLookup.at({(uint16_t)syndrome, (char)offset}); //dout << "correcting"<>1)^(last_pi); unsigned int num_diff_bits = std::bitset<16>(diff).count(); unsigned int num_diff_bits2 = std::bitset<16>(diff2).count(); - if (num_diff_bits<2 or num_diff_bits2<2){ - dout << "clockslip detection:"<(dataword)<<"\tlast_pi:"<(last_pi)<(dataword)<<"\tlast_pi:"<(last_pi)<>2); + diff2=(dataword>>2)^(last_pi); + num_diff_bits = std::bitset<16>(diff).count(); + num_diff_bits2 = std::bitset<16>(diff2).count(); + if (num_diff_bits<2){ + dout << "clockslip detection (forward,skipped two):"<(dataword)<<"\tlast_pi:"<(last_pi)<(dataword)<<"\tlast_pi:"<(last_pi)<