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) {
|
switch (rds.rdsB >> 11) {
|
||||||
case RDS_GROUP_0A:
|
case RDS_GROUP_0A:
|
||||||
{
|
{
|
||||||
|
// Serial.println(rds.rdsB,BIN);
|
||||||
//PS decoder
|
//PS decoder
|
||||||
if (showrdserrors || rds.correct) {
|
if (showrdserrors || rds.correct) {
|
||||||
offset = rds.rdsB & 0x03; // Let's get the character offset for PS
|
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);
|
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 (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
|
// PTY decoder
|
||||||
@@ -617,6 +622,10 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
|||||||
rds.hasArtist = false;
|
rds.hasArtist = false;
|
||||||
rds.hasEvent = false;
|
rds.hasEvent = false;
|
||||||
rds.hasHost = false;
|
rds.hasHost = false;
|
||||||
|
rds.hasArtificialhead = false;
|
||||||
|
rds.hasCompressed = false;
|
||||||
|
rds.hasDynamicPTY = false;
|
||||||
|
rds.hasStereo = false;
|
||||||
ps_counter = 0;
|
ps_counter = 0;
|
||||||
af_counter = 0;
|
af_counter = 0;
|
||||||
rds.MS = 0;
|
rds.MS = 0;
|
||||||
|
|||||||
@@ -111,6 +111,10 @@ typedef struct _rds_ {
|
|||||||
bool rdsBerror;
|
bool rdsBerror;
|
||||||
bool rdsCerror;
|
bool rdsCerror;
|
||||||
bool rdsDerror;
|
bool rdsDerror;
|
||||||
|
bool hasArtificialhead;
|
||||||
|
bool hasCompressed;
|
||||||
|
bool hasDynamicPTY;
|
||||||
|
bool hasStereo;
|
||||||
bool hasRDS;
|
bool hasRDS;
|
||||||
bool hasECC;
|
bool hasECC;
|
||||||
bool hasRT;
|
bool hasRT;
|
||||||
|
|||||||
Reference in New Issue
Block a user