mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
BFM demod: RDS GUI part #6: implemented groups 1,2 and 8
This commit is contained in:
parent
542877a454
commit
bbf2469431
@ -63,6 +63,7 @@ public:
|
||||
Real getPilotLevel() const { return m_pilotPLL.get_pilot_level(); }
|
||||
|
||||
Real getDecoderQua() const { return m_rdsDecoder.m_qua; }
|
||||
bool getDecoderSynced() const { return m_rdsDecoder.synced(); }
|
||||
Real getDemodAcc() const { return m_rdsDemod.m_report.acc; }
|
||||
Real getDemodQua() const { return m_rdsDemod.m_report.qua; }
|
||||
Real getDemodFclk() const { return m_rdsDemod.m_report.fclk; }
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "bfmdemodgui.h"
|
||||
#include "ui_bfmdemodgui.h"
|
||||
#include "bfmdemod.h"
|
||||
#include "rdstmc.h"
|
||||
|
||||
const int BFMDemodGUI::m_rfBW[] = {
|
||||
80000, 100000, 120000, 140000, 160000, 180000, 200000, 220000, 250000
|
||||
@ -249,8 +250,11 @@ void BFMDemodGUI::on_showPilot_clicked()
|
||||
|
||||
void BFMDemodGUI::on_rds_clicked()
|
||||
{
|
||||
m_rdsParser.clearAllFields();
|
||||
rdsUpdate(true);
|
||||
if (ui->rds->isChecked()) {
|
||||
m_rdsParser.clearAllFields();
|
||||
rdsUpdate(true);
|
||||
}
|
||||
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -418,14 +422,14 @@ void BFMDemodGUI::channelSampleRateChanged()
|
||||
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->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->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());
|
||||
//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->g08Label->setText(m_rdsParser.rds_group_acronym_tags[8].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());
|
||||
|
||||
@ -451,6 +455,12 @@ void BFMDemodGUI::rdsUpdate(bool force)
|
||||
ui->accumText->setText(QString("%1 dB").arg(accDb, 0, 'f', 1));
|
||||
ui->fclkText->setText(QString("%1 Hz").arg(m_bfmDemod->getDemodFclk(), 0, 'f', 2));
|
||||
|
||||
if (m_bfmDemod->getDecoderSynced()) {
|
||||
ui->decoderQLabel->setStyleSheet("QLabel { background-color : green; }");
|
||||
} else {
|
||||
ui->decoderQLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// PI group
|
||||
if (m_rdsParser.m_pi_updated || force)
|
||||
{
|
||||
@ -516,6 +526,45 @@ void BFMDemodGUI::rdsUpdate(bool force)
|
||||
ui->g00Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G1 group
|
||||
if (m_rdsParser.m_g1_updated || force)
|
||||
{
|
||||
ui->g01Label->setStyleSheet("QLabel { background-color : green; }");
|
||||
ui->g01CountText->setNum((int) m_rdsParser.m_g1_count);
|
||||
|
||||
if ((m_rdsParser.m_g1_country_page_index >= 0) && (m_rdsParser.m_g1_country_index >= 0)) {
|
||||
ui->g01CountryCode->setText(QString((m_rdsParser.pi_country_codes[m_rdsParser.m_g1_country_page_index][m_rdsParser.m_g1_country_index]).c_str()));
|
||||
}
|
||||
|
||||
if (m_rdsParser.m_g1_language_index >= 0) {
|
||||
ui->g01Language->setText(QString(m_rdsParser.language_codes[m_rdsParser.m_g1_language_index].c_str()));
|
||||
}
|
||||
|
||||
ui->g01DHM->setText(QString(str(boost::format("%id:%i:%i") % m_rdsParser.m_g1_pin_day % m_rdsParser.m_g1_pin_hour % m_rdsParser.m_g1_pin_minute).c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->g01Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G2 group
|
||||
if (m_rdsParser.m_g2_updated || force)
|
||||
{
|
||||
ui->g02Label->setStyleSheet("QLabel { background-color : green; }");
|
||||
ui->g02CountText->setNum((int) m_rdsParser.m_g2_count);
|
||||
ui->go2Text->setText(QString(m_rdsParser.m_g2_radiotext));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->g02Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G3 group
|
||||
if (m_rdsParser.m_g3_updated || force)
|
||||
{
|
||||
ui->g03CountText->setNum((int) m_rdsParser.m_g3_count);
|
||||
}
|
||||
|
||||
// G4 group
|
||||
if (m_rdsParser.m_g4_updated || force)
|
||||
{
|
||||
@ -530,5 +579,59 @@ void BFMDemodGUI::rdsUpdate(bool force)
|
||||
ui->g04Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G5 group
|
||||
if (m_rdsParser.m_g5_updated || force)
|
||||
{
|
||||
ui->g05CountText->setNum((int) m_rdsParser.m_g5_count);
|
||||
}
|
||||
|
||||
// G6 group
|
||||
if (m_rdsParser.m_g6_updated || force)
|
||||
{
|
||||
ui->g06CountText->setNum((int) m_rdsParser.m_g6_count);
|
||||
}
|
||||
|
||||
// G7 group
|
||||
if (m_rdsParser.m_g7_updated || force)
|
||||
{
|
||||
ui->g07CountText->setNum((int) m_rdsParser.m_g7_count);
|
||||
}
|
||||
|
||||
// G8 group
|
||||
if (m_rdsParser.m_g8_updated || force)
|
||||
{
|
||||
ui->g08Label->setStyleSheet("QLabel { background-color : green; }");
|
||||
ui->g08CountText->setNum((int) m_rdsParser.m_g8_count);
|
||||
|
||||
std::ostringstream os;
|
||||
os << (m_rdsParser.m_g8_sign ? "-" : "+") << m_rdsParser.m_g8_extent + 1;
|
||||
ui->g08Extent->setText(QString(os.str().c_str()));
|
||||
int event_line = RDSTMC::get_tmc_event_code_index(m_rdsParser.m_g8_event, 1);
|
||||
ui->g08TMCEvent->setText(QString(RDSTMC::get_tmc_events(event_line, 1).c_str()));
|
||||
ui->g08Location->setNum((int) m_rdsParser.m_g8_location);
|
||||
|
||||
if (m_rdsParser.m_g8_label_index >= 0) {
|
||||
ui->g08Description->setText(QString(m_rdsParser.label_descriptions[m_rdsParser.m_g8_label_index].c_str()));
|
||||
}
|
||||
|
||||
ui->g08Content->setNum(m_rdsParser.m_g8_content);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->g08Label->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
// G9 group
|
||||
if (m_rdsParser.m_g9_updated || force)
|
||||
{
|
||||
ui->g09CountText->setNum((int) m_rdsParser.m_g9_count);
|
||||
}
|
||||
|
||||
// G14 group
|
||||
if (m_rdsParser.m_g14_updated || force)
|
||||
{
|
||||
ui->g14CountText->setNum((int) m_rdsParser.m_g14_count);
|
||||
}
|
||||
|
||||
m_rdsParser.clearUpdateFlags();
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>514</width>
|
||||
<width>676</width>
|
||||
<height>729</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -436,8 +436,8 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>150</y>
|
||||
<width>500</width>
|
||||
<height>201</height>
|
||||
<width>561</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -678,6 +678,12 @@
|
||||
<layout class="QGridLayout" name="countersLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="piCountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PI</string>
|
||||
</property>
|
||||
@ -695,6 +701,12 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="g00CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G00</string>
|
||||
</property>
|
||||
@ -712,6 +724,12 @@
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="g03CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G03</string>
|
||||
</property>
|
||||
@ -719,6 +737,12 @@
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="g01CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G01</string>
|
||||
</property>
|
||||
@ -736,6 +760,12 @@
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="g02CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G02</string>
|
||||
</property>
|
||||
@ -753,6 +783,12 @@
|
||||
</item>
|
||||
<item row="0" column="9">
|
||||
<widget class="QLabel" name="g08CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G08</string>
|
||||
</property>
|
||||
@ -760,6 +796,12 @@
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QLabel" name="g07CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G07</string>
|
||||
</property>
|
||||
@ -777,6 +819,12 @@
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="g04CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G04</string>
|
||||
</property>
|
||||
@ -794,6 +842,12 @@
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="g05CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G05</string>
|
||||
</property>
|
||||
@ -811,6 +865,12 @@
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLabel" name="g06CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G06</string>
|
||||
</property>
|
||||
@ -848,6 +908,12 @@
|
||||
</item>
|
||||
<item row="0" column="10">
|
||||
<widget class="QLabel" name="g09CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G09</string>
|
||||
</property>
|
||||
@ -865,6 +931,12 @@
|
||||
</item>
|
||||
<item row="0" column="11">
|
||||
<widget class="QLabel" name="g14CountLabel">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G14</string>
|
||||
</property>
|
||||
@ -890,7 +962,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="piDataLayout">
|
||||
<layout class="QHBoxLayout" name="row1DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="piLabel">
|
||||
<property name="maximumSize">
|
||||
@ -908,7 +980,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="piSeparator1">
|
||||
<widget class="Line" name="row1Separator1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -918,7 +990,7 @@
|
||||
<widget class="QLabel" name="piText">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -931,7 +1003,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="piSeparator2">
|
||||
<widget class="Line" name="row1Separator2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -955,6 +1027,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="piType">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Program type</string>
|
||||
</property>
|
||||
@ -965,6 +1049,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="piCoverage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Program coverage</string>
|
||||
</property>
|
||||
@ -973,10 +1069,107 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row1Separator3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g01Label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G01</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row1Separator4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g01CountryCode">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>__</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g01Language">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>___</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g01DHM">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0d 00:00</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="g00DataLayout">
|
||||
<layout class="QHBoxLayout" name="row2DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="g00Label">
|
||||
<property name="maximumSize">
|
||||
@ -994,7 +1187,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="g00Separator1">
|
||||
<widget class="Line" name="row2Separator1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -1012,12 +1205,12 @@
|
||||
<string>Program Service Name</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>........</string>
|
||||
<string>PSN</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="g00Separator2">
|
||||
<widget class="Line" name="row2Separator2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -1077,14 +1270,45 @@
|
||||
<string>Alternate frequencies (MHz)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>00.00</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="g04DataLayout">
|
||||
<layout class="QHBoxLayout" name="row4DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="g02Label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G02</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row4Separator1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="go2Text">
|
||||
<property name="text">
|
||||
<string>Radiotext</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row3DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="g04Label">
|
||||
<property name="minimumSize">
|
||||
@ -1099,7 +1323,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="g04Sep1">
|
||||
<widget class="Line" name="row3Sep1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -1109,10 +1333,16 @@
|
||||
<widget class="QLabel" name="g04Time">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>../../.. ..:..:..</string>
|
||||
</property>
|
||||
@ -1133,6 +1363,77 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row5DataLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="g08Label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G08</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="row5Separator1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g08Extent">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>+0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g08TMCEvent">
|
||||
<property name="text">
|
||||
<string>___</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g08Location">
|
||||
<property name="text">
|
||||
<string>___</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g08Description">
|
||||
<property name="text">
|
||||
<string>___</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="g08Content">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -88,7 +88,7 @@ bool RDSDecoder::frameSync(bool bit)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("RDSDecoder::frameSync: Sync State Detected");
|
||||
//qDebug("RDSDecoder::frameSync: Sync State Detected");
|
||||
enter_sync(j);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
|
||||
bool frameSync(bool bit);
|
||||
unsigned int *getGroup() { return m_group; }
|
||||
bool synced() const { return m_sync == SYNC; }
|
||||
|
||||
float m_qua;
|
||||
|
||||
|
@ -127,7 +127,7 @@ const std::string RDSParser::rds_group_acronyms[16] = {
|
||||
const std::string RDSParser::rds_group_acronym_tags[16] = {
|
||||
"BAS",
|
||||
"PIN",
|
||||
"RTX",
|
||||
"TXT",
|
||||
"AID",
|
||||
"TIM",
|
||||
"TDC",
|
||||
@ -147,7 +147,7 @@ const std::string RDSParser::rds_group_acronym_tags[16] = {
|
||||
|
||||
/* see page 84, Annex J in the standard */
|
||||
const std::string RDSParser::language_codes[44] = {
|
||||
"Unkown/not applicable",
|
||||
"N/A",
|
||||
"Albanian",
|
||||
"Breton",
|
||||
"Catalan",
|
||||
@ -243,9 +243,20 @@ void RDSParser::clearUpdateFlags()
|
||||
m_pi_updated = false;
|
||||
m_g0_updated = false;
|
||||
m_g0_af_updated = false;
|
||||
m_g1_updated = false;
|
||||
m_g2_updated = false;
|
||||
m_g4_updated = false;
|
||||
m_g5_updated = false;
|
||||
m_g6_updated = false;
|
||||
m_g7_updated = false;
|
||||
m_g8_updated = false;
|
||||
m_g9_updated = false;
|
||||
m_g10_updated = false;
|
||||
m_g11_updated = false;
|
||||
m_g12_updated = false;
|
||||
m_g13_updated = false;
|
||||
m_g14_updated = false;
|
||||
m_g15_updated = false;
|
||||
}
|
||||
|
||||
void RDSParser::clearAllFields()
|
||||
@ -310,6 +321,15 @@ void RDSParser::clearAllFields()
|
||||
m_g8_label_index = -1;
|
||||
m_g8_content = 0;
|
||||
|
||||
// Group 09..15 data
|
||||
m_g9_count = 0;
|
||||
m_g10_count = 0;
|
||||
m_g11_count = 0;
|
||||
m_g12_count = 0;
|
||||
m_g13_count = 0;
|
||||
m_g14_count = 0;
|
||||
m_g15_count = 0;
|
||||
|
||||
clearUpdateFlags();
|
||||
}
|
||||
|
||||
@ -318,9 +338,10 @@ void RDSParser::parseGroup(unsigned int *group)
|
||||
unsigned int group_type = (unsigned int)((group[1] >> 12) & 0xf);
|
||||
bool ab = (group[1] >> 11 ) & 0x1;
|
||||
|
||||
/*
|
||||
qDebug() << "RDSParser::parseGroup:"
|
||||
<< " type: " << group_type << (ab ? 'B' :'A')
|
||||
<< " (" << rds_group_acronyms[group_type].c_str() << ")";
|
||||
<< " (" << rds_group_acronyms[group_type].c_str() << ")";*/
|
||||
|
||||
m_pi_count++;
|
||||
m_pi_updated = true;
|
||||
@ -674,6 +695,10 @@ void RDSParser::decode_type3(unsigned int *group, bool B)
|
||||
int message = group[2];
|
||||
int aid = group[3];
|
||||
|
||||
|
||||
m_g3_updated = true;
|
||||
m_g3_count++;
|
||||
|
||||
qDebug() << "RDSParser::decode_type3: aid group: " << application_group
|
||||
<< " " << (group_type ? 'B' : 'A');
|
||||
|
||||
@ -752,14 +777,20 @@ void RDSParser::decode_type4(unsigned int *group, bool B)
|
||||
|
||||
void RDSParser::decode_type5(unsigned int *group, bool B) {
|
||||
qDebug() << "RDSParser::decode_type5: type5 not implemented yet";
|
||||
m_g5_updated = true;
|
||||
m_g5_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type6(unsigned int *group, bool B) {
|
||||
qDebug() << "RDSParser::decode_type6: type 6 not implemented yet";
|
||||
m_g6_updated = true;
|
||||
m_g6_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type7(unsigned int *group, bool B) {
|
||||
qDebug() << "RDSParser::decode_type7: type 7 not implemented yet";
|
||||
m_g7_updated = true;
|
||||
m_g7_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type8(unsigned int *group, bool B)
|
||||
@ -800,7 +831,7 @@ void RDSParser::decode_type8(unsigned int *group, bool B)
|
||||
m_g8_sign = (group[2] >> 14) & 0x1; // event direction, 0 = +, 1 = -
|
||||
m_g8_extent = (group[2] >> 11) & 0x7; // number of segments affected
|
||||
m_g8_event = group[2] & 0x7ff; // event code, defined in ISO 14819-2
|
||||
unsigned int location = group[3]; // location code, defined in ISO 14819-3
|
||||
m_g8_location = group[3]; // location code, defined in ISO 14819-3
|
||||
|
||||
qDebug() << "RDSParser::decode_type8: #user msg# " << (D ? "diversion recommended, " : "");
|
||||
|
||||
@ -814,7 +845,7 @@ void RDSParser::decode_type8(unsigned int *group, bool B)
|
||||
|
||||
qDebug() << "RDSParser::decode_type8: extent:" << (m_g8_sign ? "-" : "") << m_g8_extent + 1 << " segments"
|
||||
<< ", event" << m_g8_event << ":" << RDSTMC::get_tmc_events(event_line, 1).c_str()
|
||||
<< ", location:" << location;
|
||||
<< ", location:" << m_g8_location;
|
||||
|
||||
}
|
||||
else
|
||||
@ -859,30 +890,41 @@ void RDSParser::decode_optional_content(int no_groups, unsigned long int *free_f
|
||||
ff_pointer -= content_length;
|
||||
m_g8_content = (free_format[i] && (int(std::pow(2, content_length) - 1) << ff_pointer));
|
||||
|
||||
/*
|
||||
qDebug() << "RDSParser::decode_optional_content: TMC optional content (" << label_descriptions[m_g8_label_index].c_str()
|
||||
<< "):" << m_g8_content;
|
||||
<< "):" << m_g8_content;*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RDSParser::decode_type9(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type9: type 9 not implemented yet";
|
||||
m_g9_updated = true;
|
||||
m_g9_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type10(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type10: type 10 not implemented yet";
|
||||
m_g10_updated = true;
|
||||
m_g10_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type11(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type11: type 11 not implemented yet";
|
||||
m_g11_updated = true;
|
||||
m_g11_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type12(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type12: type 12 not implemented yet";
|
||||
m_g12_updated = true;
|
||||
m_g12_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type13(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type13: type 13 not implemented yet";
|
||||
m_g13_updated = true;
|
||||
m_g13_count++;
|
||||
}
|
||||
|
||||
void RDSParser::decode_type14(unsigned int *group, bool B)
|
||||
@ -898,6 +940,9 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
|
||||
double af_1 = 0;
|
||||
double af_2 = 0;
|
||||
|
||||
m_g14_updated = true;
|
||||
m_g14_count++;
|
||||
|
||||
if (!B)
|
||||
{
|
||||
switch (variant_code)
|
||||
@ -975,7 +1020,8 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
|
||||
|
||||
if (pi_on)
|
||||
{
|
||||
qDebug() << "RDSParser::decode_type14: PI(ON):" << pi_on;
|
||||
std::string pistring = str(boost::format("%04X") % pi_on);
|
||||
qDebug() << "RDSParser::decode_type14: PI(ON):" << pistring.c_str();
|
||||
|
||||
if (tp_on) {
|
||||
qDebug() << "RDSParser::decode_type14: TP(ON)";
|
||||
@ -985,5 +1031,7 @@ void RDSParser::decode_type14(unsigned int *group, bool B)
|
||||
|
||||
void RDSParser::decode_type15(unsigned int *group, bool B){
|
||||
qDebug() << "RDSParser::decode_type5: type 15 not implemented yet";
|
||||
m_g15_updated = true;
|
||||
m_g15_count++;
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
char m_g2_radiotext[64+1];
|
||||
|
||||
// G3 data
|
||||
bool m_g3_updated;
|
||||
unsigned int m_g3_count;
|
||||
|
||||
// G4 data
|
||||
@ -87,6 +88,9 @@ public:
|
||||
double m_g4_local_time_offset;
|
||||
|
||||
// G5..G7 data
|
||||
bool m_g5_updated;
|
||||
bool m_g6_updated;
|
||||
bool m_g7_updated;
|
||||
unsigned int m_g5_count;
|
||||
unsigned int m_g6_count;
|
||||
unsigned int m_g7_count;
|
||||
@ -99,9 +103,26 @@ public:
|
||||
bool m_g8_sign;
|
||||
unsigned int m_g8_extent;
|
||||
unsigned int m_g8_event;
|
||||
unsigned int m_g8_location;
|
||||
int m_g8_label_index; //!< negative if not received
|
||||
int m_g8_content;
|
||||
|
||||
// G9..G15 data
|
||||
bool m_g9_updated;
|
||||
bool m_g10_updated;
|
||||
bool m_g11_updated;
|
||||
bool m_g12_updated;
|
||||
bool m_g13_updated;
|
||||
bool m_g14_updated;
|
||||
bool m_g15_updated;
|
||||
unsigned int m_g9_count;
|
||||
unsigned int m_g10_count;
|
||||
unsigned int m_g11_count;
|
||||
unsigned int m_g12_count;
|
||||
unsigned int m_g13_count;
|
||||
unsigned int m_g14_count;
|
||||
unsigned int m_g15_count;
|
||||
|
||||
// Static tables
|
||||
static const unsigned int offset_pos[5];
|
||||
static const unsigned int offset_word[5];
|
||||
|
Loading…
Reference in New Issue
Block a user