Skip to content

Commit

Permalink
RDS: fix flags decoding
Browse files Browse the repository at this point in the history
Change d0...d3 order to d3...d0 to match the standard.
Change decoding of Mono/Stereo flag to match the standard.
Change decoding of stPTY flag to match the standard.
  • Loading branch information
vladisslav2011 committed Jul 3, 2024
1 parent 4c825c1 commit 7d8fbc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/dsp/rds/parser_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ void parser_impl::decode_type0(unsigned int *group, bool B) {
/* see page 41, table 9 of the standard */
switch (segment_address) {
case 0:
mono_stereo=decoder_control_bit;
static_pty=!decoder_control_bit;
break;
case 1:
artificial_head=decoder_control_bit;
compressed=decoder_control_bit;
break;
case 2:
compressed=decoder_control_bit;
artificial_head=decoder_control_bit;
break;
case 3:
static_pty=decoder_control_bit;
mono_stereo=decoder_control_bit;
break;
default:
break;
Expand Down
4 changes: 2 additions & 2 deletions src/qtgui/dockrds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ void DockRDS::updateRDS(QString text, int type)
if (str.at(1) == '1') out.append("TA ");
if (str.at(2) == '0') out.append("Speech ");
if (str.at(2) == '1') out.append("Music ");
if (str.at(3) == '0') out.append("Stereo ");
if (str.at(3) == '1') out.append("Mono ");
if (str.at(3) == '1') out.append("Stereo ");
if (str.at(3) == '0') out.append("Mono ");
if (str.at(4) == '1') out.append("AH ");
if (str.at(5) == '1') out.append("CMP ");
if (str.at(6) == '1') out.append("stPTY ");
Expand Down

0 comments on commit 7d8fbc5

Please sign in to comment.