mirror of
https://github.com/gqrx-sdr/gqrx.git
synced 2024-09-21 02:37:12 +00:00
Merge pull request #1361 from vladisslav2011/rds_flags_fix
RDS: fix flags decoding
This commit is contained in:
commit
25fdbb5a6b
@ -66,7 +66,7 @@ void parser_impl::reset() {
|
|||||||
mono_stereo = false;
|
mono_stereo = false;
|
||||||
artificial_head = false;
|
artificial_head = false;
|
||||||
compressed = false;
|
compressed = false;
|
||||||
static_pty = false;
|
dynamic_pty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* type 0 = PI
|
/* type 0 = PI
|
||||||
@ -103,16 +103,16 @@ void parser_impl::decode_type0(unsigned int *group, bool B) {
|
|||||||
/* see page 41, table 9 of the standard */
|
/* see page 41, table 9 of the standard */
|
||||||
switch (segment_address) {
|
switch (segment_address) {
|
||||||
case 0:
|
case 0:
|
||||||
mono_stereo=decoder_control_bit;
|
dynamic_pty=decoder_control_bit;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
artificial_head=decoder_control_bit;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
compressed=decoder_control_bit;
|
compressed=decoder_control_bit;
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
artificial_head=decoder_control_bit;
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
static_pty=decoder_control_bit;
|
mono_stereo=decoder_control_bit;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -123,7 +123,7 @@ void parser_impl::decode_type0(unsigned int *group, bool B) {
|
|||||||
flagstring[3] = mono_stereo ? '1' : '0';
|
flagstring[3] = mono_stereo ? '1' : '0';
|
||||||
flagstring[4] = artificial_head ? '1' : '0';
|
flagstring[4] = artificial_head ? '1' : '0';
|
||||||
flagstring[5] = compressed ? '1' : '0';
|
flagstring[5] = compressed ? '1' : '0';
|
||||||
flagstring[6] = static_pty ? '1' : '0';
|
flagstring[6] = dynamic_pty ? '1' : '0';
|
||||||
static std::string af_string;
|
static std::string af_string;
|
||||||
|
|
||||||
if(!B) { // type 0A
|
if(!B) { // type 0A
|
||||||
|
@ -68,7 +68,7 @@ private:
|
|||||||
bool mono_stereo;
|
bool mono_stereo;
|
||||||
bool artificial_head;
|
bool artificial_head;
|
||||||
bool compressed;
|
bool compressed;
|
||||||
bool static_pty;
|
bool dynamic_pty;
|
||||||
bool log;
|
bool log;
|
||||||
bool debug;
|
bool debug;
|
||||||
unsigned char pty_locale;
|
unsigned char pty_locale;
|
||||||
|
@ -70,11 +70,11 @@ void DockRDS::updateRDS(QString text, int type)
|
|||||||
if (str.at(1) == '1') out.append("TA ");
|
if (str.at(1) == '1') out.append("TA ");
|
||||||
if (str.at(2) == '0') out.append("Speech ");
|
if (str.at(2) == '0') out.append("Speech ");
|
||||||
if (str.at(2) == '1') out.append("Music ");
|
if (str.at(2) == '1') out.append("Music ");
|
||||||
if (str.at(3) == '0') out.append("Stereo ");
|
if (str.at(3) == '1') out.append("Stereo ");
|
||||||
if (str.at(3) == '1') out.append("Mono ");
|
if (str.at(3) == '0') out.append("Mono ");
|
||||||
if (str.at(4) == '1') out.append("AH ");
|
if (str.at(4) == '1') out.append("AH ");
|
||||||
if (str.at(5) == '1') out.append("CMP ");
|
if (str.at(5) == '1') out.append("CMP ");
|
||||||
if (str.at(6) == '1') out.append("stPTY ");
|
if (str.at(6) == '0') out.append("stPTY ");
|
||||||
ui->flags->setText(QString::fromStdString(out));
|
ui->flags->setText(QString::fromStdString(out));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
Loading…
Reference in New Issue
Block a user