From 7845d5c609545e28622f0079afd14dcf50ac3b01 Mon Sep 17 00:00:00 2001 From: Konrad Kosmatka Date: Wed, 3 Jan 2024 18:42:16 +0100 Subject: [PATCH] Fix error correction output in XDR-GTK RDS message --- src/rds.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rds.cpp b/src/rds.cpp index 864ba3d..8aed6a7 100644 --- a/src/rds.cpp +++ b/src/rds.cpp @@ -385,9 +385,9 @@ void readRds() { XDRGTKRDS += String(((radio.rds.rdsD) >> 4) & 0xF, HEX) + String((radio.rds.rdsD) & 0xF, HEX); uint8_t erroutput = 0; - erroutput |= (radio.rds.rdsErr >> 8) & B00110000 >> 4; - erroutput |= (radio.rds.rdsErr >> 8) & B00001100; - erroutput |= (radio.rds.rdsErr >> 8) & B00000011 << 4; + erroutput |= ((radio.rds.rdsErr >> 8) & B00110000) >> 4; + erroutput |= ((radio.rds.rdsErr >> 8) & B00001100); + erroutput |= ((radio.rds.rdsErr >> 8) & B00000011) << 4; XDRGTKRDS += String((erroutput >> 4) & 0xF, HEX); XDRGTKRDS += String(erroutput & 0xF, HEX);