Browse Source

demodbfm: initialize RDS radio text A/B flag

Initialize m_radiotext_AB_flag in the RDSParser constructor to ensure the
radio text state is defined before the first Group 2 update.

Keep the flag out of clearUpdateFlags() because it is persistent parser state,
not a transient update flag. Resetting it when update flags are cleared could
incorrectly appear as an A/B transition and cause stale radio text handling.

Pointed out by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 4 months ago
parent
commit
9c8d90f4cf
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 3
      plugins/channelrx/demodbfm/rdsparser.cpp

3
plugins/channelrx/demodbfm/rdsparser.cpp

@ -232,7 +232,8 @@ const std::string RDSParser::label_descriptions[16] = { @@ -232,7 +232,8 @@ const std::string RDSParser::label_descriptions[16] = {
"RFU (Reserved for future use)"
};
RDSParser::RDSParser()
RDSParser::RDSParser():
m_radiotext_AB_flag(false)
{
clearAllFields();
}

Loading…
Cancel
Save