1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-10-01 09:16:39 -04:00

BFM demod: RDS GUI part #11: implemented group8 generic decoding

This commit is contained in:
f4exb 2015-12-16 04:43:29 +01:00
parent 73ac0c58e5
commit 729ac9cf3c
4 changed files with 85 additions and 6 deletions

View File

@ -509,7 +509,7 @@ void BFMDemodGUI::rdsUpdateFixedFields()
//ui->g06Label->setText(m_rdsParser.rds_group_acronym_tags[6].c_str());
//ui->g07Label->setText(m_rdsParser.rds_group_acronym_tags[7].c_str());
ui->g08Label->setText(m_rdsParser.rds_group_acronym_tags[8].c_str());
//ui->g09Label->setText(m_rdsParser.rds_group_acronym_tags[9].c_str());
ui->g09Label->setText(m_rdsParser.rds_group_acronym_tags[9].c_str());
ui->g14Label->setText(m_rdsParser.rds_group_acronym_tags[14].c_str());
ui->g00CountLabel->setText(m_rdsParser.rds_group_acronym_tags[0].c_str());
@ -699,7 +699,14 @@ void BFMDemodGUI::rdsUpdate(bool force)
// G9 group
if (m_rdsParser.m_g9_updated || force)
{
ui->g09Label->setStyleSheet("QLabel { background-color : green; }");
ui->g09CountText->setNum((int) m_rdsParser.m_g9_count);
std::string g9str = str(boost::format("%02X %04X %04X %02X %04X") % m_rdsParser.m_g9_varA % m_rdsParser.m_g9_cA % m_rdsParser.m_g9_dA % m_rdsParser.m_g9_varB % m_rdsParser.m_g9_dB);
ui->g09Data->setText(QString(g9str.c_str()));
}
else
{
ui->g09Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
}
// G14 group

View File

@ -1186,9 +1186,15 @@
<layout class="QHBoxLayout" name="row2DataLayout">
<item>
<widget class="QLabel" name="g00Label">
<property name="maximumSize">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
@ -1328,6 +1334,46 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="g09Label">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>G09</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="row2Separator3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="g09Data">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>00 0000 0000 00 0000</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="row2Separator4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -322,7 +322,14 @@ void RDSParser::clearAllFields()
m_g8_label_index = -1;
m_g8_content = 0;
// Group 09..13 data
// Group 09 data
m_g9_varA = 0;
m_g9_cA = 0;
m_g9_dA = 0;
m_g9_varB = 0;
m_g9_dB = 0;
// Group 10..13 data
m_g9_count = 0;
m_g10_count = 0;
m_g11_count = 0;
@ -910,7 +917,19 @@ void RDSParser::decode_optional_content(int no_groups, unsigned long int *free_f
}
void RDSParser::decode_type9(unsigned int *group, bool B){
qDebug() << "RDSParser::decode_type9: type 9 not implemented yet";
if (B)
{
m_g9_varB = group[1] & 0x1f;
m_g9_dB = group[3];
}
else
{
m_g9_varA = group[1] & 0x1f;
m_g9_cA = group[2];
m_g9_dA = group[3];
}
m_g9_updated = true;
m_g9_count++;
}

View File

@ -114,13 +114,20 @@ public:
int m_g8_label_index; //!< negative if not received
int m_g8_content;
// G9..G13 data
// G9 data
bool m_g9_updated;
unsigned int m_g9_count;
unsigned int m_g9_varA;
unsigned int m_g9_cA;
unsigned int m_g9_dA;
unsigned int m_g9_varB;
unsigned int m_g9_dB;
// G10..G13 data
bool m_g10_updated;
bool m_g11_updated;
bool m_g12_updated;
bool m_g13_updated;
unsigned int m_g9_count;
unsigned int m_g10_count;
unsigned int m_g11_count;
unsigned int m_g12_count;