Added more RDS flags to API
This commit is contained in:
+10
-1
@@ -307,7 +307,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
||||
switch (rds.rdsB >> 11) {
|
||||
case RDS_GROUP_0A:
|
||||
{
|
||||
|
||||
// Serial.println(rds.rdsB,BIN);
|
||||
//PS decoder
|
||||
if (showrdserrors || rds.correct) {
|
||||
offset = rds.rdsB & 0x03; // Let's get the character offset for PS
|
||||
@@ -334,6 +334,11 @@ void TEF6686::readRDS(bool showrdserrors)
|
||||
rds.stationName = extractUTF8Substring(utf8String, 0, 8, true);
|
||||
if (ps_counter == 6) ps_process = true; // OK, we had 2 runs, now let's go the idle PS writing
|
||||
}
|
||||
|
||||
if (offset == 0) rds.hasDynamicPTY = bitRead(rds.rdsB, 2) & 0x1F; // Dynamic PTY flag
|
||||
if (offset == 1) rds.hasCompressed = bitRead(rds.rdsB, 2) & 0x1F; // Compressed flag
|
||||
if (offset == 2) rds.hasArtificialhead = bitRead(rds.rdsB, 2) & 0x1F; // Artificial head flag
|
||||
if (offset == 3) rds.hasStereo = bitRead(rds.rdsB, 2) & 0x1F; // Stereo flag
|
||||
}
|
||||
|
||||
// PTY decoder
|
||||
@@ -617,6 +622,10 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
||||
rds.hasArtist = false;
|
||||
rds.hasEvent = false;
|
||||
rds.hasHost = false;
|
||||
rds.hasArtificialhead = false;
|
||||
rds.hasCompressed = false;
|
||||
rds.hasDynamicPTY = false;
|
||||
rds.hasStereo = false;
|
||||
ps_counter = 0;
|
||||
af_counter = 0;
|
||||
rds.MS = 0;
|
||||
|
||||
@@ -111,6 +111,10 @@ typedef struct _rds_ {
|
||||
bool rdsBerror;
|
||||
bool rdsCerror;
|
||||
bool rdsDerror;
|
||||
bool hasArtificialhead;
|
||||
bool hasCompressed;
|
||||
bool hasDynamicPTY;
|
||||
bool hasStereo;
|
||||
bool hasRDS;
|
||||
bool hasECC;
|
||||
bool hasRT;
|
||||
|
||||
Reference in New Issue
Block a user