mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-18 22:31:48 -05:00
BFM demod: RDS PSN update improvement
This commit is contained in:
parent
6a31b5964a
commit
d034063978
@ -567,7 +567,10 @@ void BFMDemodGUI::rdsUpdate(bool force)
|
|||||||
{
|
{
|
||||||
ui->g00Label->setStyleSheet("QLabel { background-color : green; }");
|
ui->g00Label->setStyleSheet("QLabel { background-color : green; }");
|
||||||
ui->g00CountText->setNum((int) m_rdsParser.m_g0_count);
|
ui->g00CountText->setNum((int) m_rdsParser.m_g0_count);
|
||||||
ui->g00ProgServiceName->setText(QString(m_rdsParser.m_g0_program_service_name));
|
|
||||||
|
if (m_rdsParser.m_g0_psn_complete) {
|
||||||
|
ui->g00ProgServiceName->setText(QString(m_rdsParser.m_g0_program_service_name));
|
||||||
|
}
|
||||||
|
|
||||||
if (m_rdsParser.m_g0_traffic_announcement) {
|
if (m_rdsParser.m_g0_traffic_announcement) {
|
||||||
ui->g00TrafficAnnouncement->setStyleSheet("QLabel { background-color : green; }");
|
ui->g00TrafficAnnouncement->setStyleSheet("QLabel { background-color : green; }");
|
||||||
|
@ -273,6 +273,7 @@ void RDSParser::clearAllFields()
|
|||||||
m_g0_count = 0;
|
m_g0_count = 0;
|
||||||
std::memset(m_g0_program_service_name, ' ', sizeof(m_g0_program_service_name));
|
std::memset(m_g0_program_service_name, ' ', sizeof(m_g0_program_service_name));
|
||||||
m_g0_program_service_name[sizeof(m_g0_program_service_name) - 1] = '\0';
|
m_g0_program_service_name[sizeof(m_g0_program_service_name) - 1] = '\0';
|
||||||
|
m_g0_psn_complete = false;
|
||||||
m_g0_traffic_announcement = false;
|
m_g0_traffic_announcement = false;
|
||||||
m_g0_music_speech = false;
|
m_g0_music_speech = false;
|
||||||
m_g0_mono_stereo = false;
|
m_g0_mono_stereo = false;
|
||||||
@ -473,8 +474,15 @@ void RDSParser::decode_type0(unsigned int *group, bool B)
|
|||||||
bool decoder_control_bit = (group[1] >> 2) & 0x01; // "DI"
|
bool decoder_control_bit = (group[1] >> 2) & 0x01; // "DI"
|
||||||
unsigned char segment_address = group[1] & 0x03; // "DI segment"
|
unsigned char segment_address = group[1] & 0x03; // "DI segment"
|
||||||
|
|
||||||
|
if (segment_address == 0)
|
||||||
|
{
|
||||||
|
std::memset(m_g0_program_service_name, ' ', sizeof(m_g0_program_service_name));
|
||||||
|
m_g0_program_service_name[sizeof(m_g0_program_service_name) - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
m_g0_program_service_name[segment_address * 2] = (group[3] >> 8) & 0xff;
|
m_g0_program_service_name[segment_address * 2] = (group[3] >> 8) & 0xff;
|
||||||
m_g0_program_service_name[segment_address * 2 + 1] = group[3] & 0xff;
|
m_g0_program_service_name[segment_address * 2 + 1] = group[3] & 0xff;
|
||||||
|
m_g0_psn_complete = (segment_address == 3);
|
||||||
|
|
||||||
/* see page 41, table 9 of the standard */
|
/* see page 41, table 9 of the standard */
|
||||||
switch (segment_address)
|
switch (segment_address)
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
bool m_g0_af_updated;
|
bool m_g0_af_updated;
|
||||||
unsigned int m_g0_count;
|
unsigned int m_g0_count;
|
||||||
char m_g0_program_service_name[8+1];
|
char m_g0_program_service_name[8+1];
|
||||||
|
bool m_g0_psn_complete;
|
||||||
bool m_g0_traffic_announcement;
|
bool m_g0_traffic_announcement;
|
||||||
bool m_g0_music_speech;
|
bool m_g0_music_speech;
|
||||||
bool m_g0_mono_stereo;
|
bool m_g0_mono_stereo;
|
||||||
|
Loading…
Reference in New Issue
Block a user