Added RDS error correction (still needs better clock recovery)

This commit is contained in:
AlexandreRouma
2022-07-08 01:02:36 +02:00
parent bdd4998b1b
commit 96f5b37f76
2 changed files with 53 additions and 39 deletions

View File

@ -138,7 +138,7 @@ namespace rds {
private:
static uint16_t calcSyndrome(uint32_t block);
static uint32_t correctErrors(uint32_t block, BlockType type);
static uint32_t correctErrors(uint32_t block, BlockType type, bool& recovered);
void decodeGroup();
bool anyGroupValid();
@ -152,6 +152,7 @@ namespace rds {
BlockType lastType = BLOCK_TYPE_A;
int contGroup = 0;
uint32_t blocks[_BLOCK_TYPE_COUNT];
bool blockAvail[_BLOCK_TYPE_COUNT];
// All groups
std::mutex groupMtx;