Fix RT refresh
This commit is contained in:
+8
-1
@@ -298,6 +298,8 @@ bool TEF6686::readRDS(bool showrdserrors)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ps_process == 2) {
|
if (ps_process == 2) {
|
||||||
|
for (int i = 0; i < 9; i++) rds.PStext[i] = 0;
|
||||||
|
rds.stationName = "";
|
||||||
RDScharConverter(ps_buffer, rds.PStext, sizeof(rds.PStext) / sizeof(wchar_t));
|
RDScharConverter(ps_buffer, rds.PStext, sizeof(rds.PStext) / sizeof(wchar_t));
|
||||||
rds.stationName = convertToUTF8(rds.PStext);
|
rds.stationName = convertToUTF8(rds.PStext);
|
||||||
|
|
||||||
@@ -364,6 +366,7 @@ bool TEF6686::readRDS(bool showrdserrors)
|
|||||||
offsetold = 0;
|
offsetold = 0;
|
||||||
rds.stationText = "";
|
rds.stationText = "";
|
||||||
if (rt_timer == 64) {
|
if (rt_timer == 64) {
|
||||||
|
for (int i = 0; i < 65; i++) rds.RTtext[i] = 0;
|
||||||
RDScharConverter(stationTextBuffer, rds.RTtext, sizeof(rds.RTtext) / sizeof(wchar_t));
|
RDScharConverter(stationTextBuffer, rds.RTtext, sizeof(rds.RTtext) / sizeof(wchar_t));
|
||||||
rds.stationText = convertToUTF8(rds.RTtext);
|
rds.stationText = convertToUTF8(rds.RTtext);
|
||||||
}
|
}
|
||||||
@@ -395,6 +398,8 @@ bool TEF6686::readRDS(bool showrdserrors)
|
|||||||
strcpy(stationTextBuffer, rt_buffer);
|
strcpy(stationTextBuffer, rt_buffer);
|
||||||
for (int i = 0; i < 64; i++) stationTextBuffer[i] = stationTextBuffer[i];
|
for (int i = 0; i < 64; i++) stationTextBuffer[i] = stationTextBuffer[i];
|
||||||
if (rt_timer < 64) {
|
if (rt_timer < 64) {
|
||||||
|
rds.stationText = "";
|
||||||
|
for (int i = 0; i < 65; i++) rds.RTtext[i] = 0;
|
||||||
RDScharConverter(stationTextBuffer, rds.RTtext, sizeof(rds.RTtext) / sizeof(wchar_t));
|
RDScharConverter(stationTextBuffer, rds.RTtext, sizeof(rds.RTtext) / sizeof(wchar_t));
|
||||||
rds.stationText = convertToUTF8(rds.RTtext);
|
rds.stationText = convertToUTF8(rds.RTtext);
|
||||||
rt_timer++;
|
rt_timer++;
|
||||||
@@ -534,11 +539,12 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
|||||||
rds.stationName = "";
|
rds.stationName = "";
|
||||||
rds.stationText = "";
|
rds.stationText = "";
|
||||||
for (i = 0; i < 9; i++) {
|
for (i = 0; i < 9; i++) {
|
||||||
// rds.stationName[i] = 0;
|
rds.PStext[i] = 0;
|
||||||
ps_buffer[i] = 0;
|
ps_buffer[i] = 0;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 65; i++) {
|
for (i = 0; i < 65; i++) {
|
||||||
stationTextBuffer[i] = 0;
|
stationTextBuffer[i] = 0;
|
||||||
|
rds.RTtext[i] = 0;
|
||||||
rt_buffer[i] = 0;
|
rt_buffer[i] = 0;
|
||||||
rt_buffer2[i] = 0;
|
rt_buffer2[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -585,6 +591,7 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
|||||||
ps_process = 1;
|
ps_process = 1;
|
||||||
af_counter = 0;
|
af_counter = 0;
|
||||||
rt_timer = 0;
|
rt_timer = 0;
|
||||||
|
rds.rdsreset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TEF6686::tone(uint16_t time, int16_t amplitude, uint16_t frequency) {
|
void TEF6686::tone(uint16_t time, int16_t amplitude, uint16_t frequency) {
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ typedef struct _rds_ {
|
|||||||
bool correct;
|
bool correct;
|
||||||
bool correctPI;
|
bool correctPI;
|
||||||
bool underscore;
|
bool underscore;
|
||||||
|
bool rdsreset;
|
||||||
} rds_;
|
} rds_;
|
||||||
|
|
||||||
typedef struct _af_ {
|
typedef struct _af_ {
|
||||||
|
|||||||
Reference in New Issue
Block a user