Quick and super simple RDS log mod for the SDRAngel

rdsparser.cpp

Append group data to log file in hex format.

void RDSParser::parseGroup(unsigned int *group)
{
    unsigned int group_type = (unsigned int)((group[1] >> 12) & 0xf);
    bool ab = (group[1] >> 11 ) & 0x1;

     // add this
    {
        std::ofstream ofs("rdslog.txt", std::ios::app);
        if (ofs)
        {
            ofs << std::hex << std::uppercase;
            // print each 16-bit word as zero-padded 4-digit hex when possible
            ofs << std::setw(4) << std::setfill('0') << (group[0] & 0xFFFF);
            ofs << std::setw(4) << std::setfill('0') << (group[1] & 0xFFFF);
            ofs << std::setw(4) << std::setfill('0') << (group[2] & 0xFFFF);
            ofs << std::setw(4) << std::setfill('0') << (group[3] & 0xFFFF);
            ofs << std::endl;
        }
    }
    // end add


    /*
    qDebug() << "RDSParser::parseGroup:"
            << " type: " << group_type << (ab ? 'B' :'A')
            << " (" << rds_group_acronyms[group_type].c_str() << ")";*/

    m_pi_count++; 

Comments

Popular posts from this blog

Telive-2 how-to

Inspecting Alinco DJ-X100E firmware updater

Modifying LILYGO T3 LoRa32 RTL_433 ESP OOK receiver example - log found devices to file