mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
BFM demod: RDS GUI part #12: implemented group 3 generic decoding
This commit is contained in:
parent
729ac9cf3c
commit
62cb806eb1
@ -503,7 +503,7 @@ void BFMDemodGUI::rdsUpdateFixedFields()
|
||||
ui->g00Label->setText(m_rdsParser.rds_group_acronym_tags[0].c_str());
|
||||
ui->g01Label->setText(m_rdsParser.rds_group_acronym_tags[1].c_str());
|
||||
ui->g02Label->setText(m_rdsParser.rds_group_acronym_tags[2].c_str());
|
||||
//ui->g03Label->setText(m_rdsParser.rds_group_acronym_tags[3].c_str());
|
||||
ui->g03Label->setText(m_rdsParser.rds_group_acronym_tags[3].c_str());
|
||||
ui->g04Label->setText(m_rdsParser.rds_group_acronym_tags[4].c_str());
|
||||
//ui->g05Label->setText(m_rdsParser.rds_group_acronym_tags[5].c_str());
|
||||
//ui->g06Label->setText(m_rdsParser.rds_group_acronym_tags[6].c_str());
|
||||
@ -636,7 +636,14 @@ void BFMDemodGUI::rdsUpdate(bool force)
|
||||
// G3 group
|
||||
if (m_rdsParser.m_g3_updated || force)
|
||||
{
|
||||
ui->g03Label->setStyleSheet("QLabel { background-color : green; }");
|
||||
ui->g03CountText->setNum((int) m_rdsParser.m_g3_count);
|
||||
std::string g3str = str(boost::format("%02X%c %04X %04X") % m_rdsParser.m_g3_appGroup % (m_rdsParser.m_g3_groupB ? 'B' : 'A') % m_rdsParser.m_g3_message % m_rdsParser.m_g3_aid);
|
||||
ui->g03Data->setText(QString(g3str.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->g03Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G4 group
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>712</width>
|
||||
<width>846</width>
|
||||
<height>729</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -436,7 +436,7 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>150</y>
|
||||
<width>661</width>
|
||||
<width>791</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -979,9 +979,15 @@
|
||||
<layout class="QHBoxLayout" name="row1DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="piLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1025,9 +1031,15 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="piTPIndicator">
|
||||
<property name="maximumSize">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1244,9 +1256,15 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g00TrafficAnnouncement">
|
||||
<property name="maximumSize">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1306,7 +1324,7 @@
|
||||
<widget class="QComboBox" name="g00AltFrequenciesBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -1334,6 +1352,59 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row2Separator6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g03Label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 3 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G03</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row2Separator5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g03Data">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Application Information data for Open Data</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00A 0000 0000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row2Separator7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g09Label">
|
||||
<property name="minimumSize">
|
||||
@ -1342,6 +1413,9 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 9 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G09</string>
|
||||
</property>
|
||||
@ -1358,22 +1432,18 @@
|
||||
<widget class="QLabel" name="g09Data">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<width>130</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Emergency Warning System raw data</string>
|
||||
</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>
|
||||
@ -1386,6 +1456,9 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 2 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G02</string>
|
||||
</property>
|
||||
@ -1417,6 +1490,9 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 4 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G04</string>
|
||||
</property>
|
||||
@ -1472,16 +1548,19 @@
|
||||
<widget class="QLabel" name="g14Label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 14 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G14</string>
|
||||
</property>
|
||||
@ -1545,6 +1624,9 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group 8 updated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G08</string>
|
||||
</property>
|
||||
|
@ -718,8 +718,9 @@ void RDSParser::decode_type3(unsigned int *group, bool B)
|
||||
m_g3_updated = true;
|
||||
m_g3_count++;
|
||||
|
||||
/*
|
||||
qDebug() << "RDSParser::decode_type3: aid group: " << application_group
|
||||
<< " " << (group_type ? 'B' : 'A');
|
||||
<< " " << (group_type ? 'B' : 'A');*/
|
||||
|
||||
if ((application_group == 8) && (group_type == false))
|
||||
{ // 8A
|
||||
@ -735,6 +736,7 @@ void RDSParser::decode_type3(unsigned int *group, bool B)
|
||||
bool R = (message >> 1) & 0x1; // regional
|
||||
bool U = message & 0x1; // urban
|
||||
|
||||
/*
|
||||
qDebug() << "RDSParser::decode_type3: location table: " << ltn << " - "
|
||||
<< (afi ? "AFI-ON" : "AFI-OFF") << " - "
|
||||
<< (M ? "enhanced mode" : "basic mode") << " - "
|
||||
@ -742,19 +744,25 @@ void RDSParser::decode_type3(unsigned int *group, bool B)
|
||||
<< (N ? "national " : "")
|
||||
<< (R ? "regional " : "")
|
||||
<< (U ? "urban" : "")
|
||||
<< " aid: " << aid;
|
||||
<< " aid: " << aid;*/
|
||||
}
|
||||
else if (variant_code==1)
|
||||
{
|
||||
int G = (message >> 12) & 0x3; // gap
|
||||
int sid = (message >> 6) & 0x3f; // service identifier
|
||||
int gap_no[4] = {3, 5, 8, 11};
|
||||
/*
|
||||
qDebug() << "RDSParser::decode_type3: gap: " << gap_no[G] << " groups, SID: "
|
||||
<< sid << " ";
|
||||
<< sid << " ";*/
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "RDSParser::decode_type3: message: " << message << " - aid: " << aid;
|
||||
m_g3_groupB = group_type;
|
||||
m_g3_appGroup = application_group;
|
||||
m_g3_message = message;
|
||||
m_g3_aid = aid;
|
||||
|
||||
//qDebug() << "RDSParser::decode_type3: message: " << message << " - aid: " << aid;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type4(unsigned int *group, bool B)
|
||||
|
@ -82,6 +82,10 @@ public:
|
||||
// G3 data
|
||||
bool m_g3_updated;
|
||||
unsigned int m_g3_count;
|
||||
bool m_g3_groupB;
|
||||
unsigned int m_g3_appGroup;
|
||||
unsigned int m_g3_message;
|
||||
unsigned int m_g3_aid;
|
||||
|
||||
// G4 data
|
||||
bool m_g4_updated;
|
||||
|
Loading…
Reference in New Issue
Block a user