1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-19 06:41:47 -05:00

BFM demod: corrected RDS EON block program service name update

This commit is contained in:
f4exb 2015-12-17 04:32:22 +01:00
parent 444f829e29
commit cdae494a92
2 changed files with 8 additions and 8 deletions

View File

@ -351,7 +351,7 @@ void RDSParser::clearAllFields()
std::memset(m_g14_program_service_name, ' ', sizeof(m_g14_program_service_name)); std::memset(m_g14_program_service_name, ' ', sizeof(m_g14_program_service_name));
m_g14_alt_freq_set.clear(); m_g14_alt_freq_set.clear();
m_g14_mapped_freq_set.clear(); m_g14_mapped_freq_set.clear();
m_g14_psn_updated = false; m_g14_psn_counter = 0;
// Group 15 // Group 15
m_g15_count = 0; m_g15_count = 0;
@ -1000,7 +1000,7 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
{ {
m_g14_program_service_name[variant_code * 2 ] = (information >> 8) & 0xff; m_g14_program_service_name[variant_code * 2 ] = (information >> 8) & 0xff;
m_g14_program_service_name[variant_code * 2 + 1] = information & 0xff; m_g14_program_service_name[variant_code * 2 + 1] = information & 0xff;
m_g14_psn_updated = true; m_g14_psn_counter++;
//qDebug() << "RDSParser::decode_type14: PS(ON): \"" << std::string(m_g14_program_service_name, 8).c_str() << "\""; //qDebug() << "RDSParser::decode_type14: PS(ON): \"" << std::string(m_g14_program_service_name, 8).c_str() << "\"";
break; break;
} }
@ -1044,18 +1044,18 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
break; break;
case 12: // linkage information case 12: // linkage information
{ {
if (m_g14_psn_updated) if (m_g14_psn_counter == 4)
{ {
qDebug("RDSParser::decode_type14: m_g14_psn_updated"); //qDebug("RDSParser::decode_type14: m_g14_psn_updated: %d", m_g14_psn_counter);
std::pair<psns_map_t::iterator, bool> ret = m_g14_program_service_names.insert(psns_map_kv_t(pi_on, std::string(m_g14_program_service_name))); std::pair<psns_map_t::iterator, bool> ret = m_g14_program_service_names.insert(psns_map_kv_t(pi_on, std::string(m_g14_program_service_name)));
std::memset(m_g14_program_service_name, ' ', sizeof(m_g14_program_service_name)); std::memset(m_g14_program_service_name, ' ', sizeof(m_g14_program_service_name));
m_g14_psn_updated = false; m_g14_psn_counter = 0;
m_g14_data_available = ret.second; m_g14_data_available = ret.second;
} }
if (m_g14_alt_freq_set.size() > 0) if (m_g14_alt_freq_set.size() > 0)
{ {
qDebug("RDSParser::decode_type14: m_g14_alt_freq_set updated"); //qDebug("RDSParser::decode_type14: m_g14_alt_freq_set updated");
std::pair<freqs_map_t::iterator, bool> retMap; std::pair<freqs_map_t::iterator, bool> retMap;
std::pair<freqs_set_t::iterator, bool> retSet; std::pair<freqs_set_t::iterator, bool> retSet;
@ -1086,7 +1086,7 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
if (m_g14_mapped_freq_set.size() > 0) if (m_g14_mapped_freq_set.size() > 0)
{ {
qDebug("RDSParser::decode_type14: m_g14_mapped_freq_set updated"); //qDebug("RDSParser::decode_type14: m_g14_mapped_freq_set updated");
std::pair<freqs_map_t::iterator, bool> retMap; std::pair<freqs_map_t::iterator, bool> retMap;
std::pair<freqs_set_t::iterator, bool> retSet; std::pair<freqs_set_t::iterator, bool> retSet;

View File

@ -146,7 +146,7 @@ public:
char m_g14_program_service_name[8+1]; char m_g14_program_service_name[8+1];
std::set<double> m_g14_alt_freq_set; std::set<double> m_g14_alt_freq_set;
std::set<double> m_g14_mapped_freq_set; std::set<double> m_g14_mapped_freq_set;
bool m_g14_psn_updated; unsigned int m_g14_psn_counter;
bool m_g14_data_available; bool m_g14_data_available;
// G15 data // G15 data