Code cleanup
This commit is contained in:
+5
-6
@@ -3,7 +3,6 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <TimeLib.h> // https://github.com/PaulStoffregen/Time
|
#include <TimeLib.h> // https://github.com/PaulStoffregen/Time
|
||||||
#include "SPIFFS.h"
|
#include "SPIFFS.h"
|
||||||
//#include "callsigns_usa.h"
|
|
||||||
|
|
||||||
unsigned long rdstimer = 0;
|
unsigned long rdstimer = 0;
|
||||||
unsigned long bitStartTime = 0;
|
unsigned long bitStartTime = 0;
|
||||||
@@ -34,7 +33,7 @@ void TEF6686::TestAFEON() {
|
|||||||
delay(200);
|
delay(200);
|
||||||
devTEF_Radio_Get_RDS_Status(&rds.rdsStat, &rds.rdsA, &rds.rdsB, &rds.rdsC, &rds.rdsD, &rds.rdsErr);
|
devTEF_Radio_Get_RDS_Status(&rds.rdsStat, &rds.rdsA, &rds.rdsB, &rds.rdsC, &rds.rdsD, &rds.rdsErr);
|
||||||
if (rds.rdsStat & (1 << 9)) {
|
if (rds.rdsStat & (1 << 9)) {
|
||||||
if (rds.rdsA == rds.correctPI && (((rds.rdsErr >> 14) & 0x03) == 0)) {
|
if (((afmethodB && rds.afreg && ((rds.rdsA >> 8) & 0x0F) == (rds.correctPI & 0x0F)) || (!afmethodB && rds.rdsA == rds.correctPI)) && (((rds.rdsErr >> 14) & 0x03) == 0)) {
|
||||||
af[x].checked = true;
|
af[x].checked = true;
|
||||||
af[x].afvalid = true;
|
af[x].afvalid = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -486,8 +485,8 @@ void TEF6686::readRDS(byte showrdserrors)
|
|||||||
|
|
||||||
char *token = strtok(buffer, ";");
|
char *token = strtok(buffer, ";");
|
||||||
|
|
||||||
int firstColumnValue;
|
int firstColumnValue = 0;
|
||||||
uint16_t frequencyValue;
|
uint16_t frequencyValue = 0;
|
||||||
char stationID[8];
|
char stationID[8];
|
||||||
char stationState[8];
|
char stationState[8];
|
||||||
|
|
||||||
@@ -1431,8 +1430,8 @@ void TEF6686::clearRDS (bool fullsearchrds)
|
|||||||
rds.stationID[8] = 0;
|
rds.stationID[8] = 0;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) rds.stationState[i] = 0x20;
|
for (i = 0; i < 2; i++) rds.stationState[i] = 0x20;
|
||||||
rds.stationState[3] = 0;
|
rds.stationState[2] = 0;
|
||||||
|
|
||||||
for (i = 0; i < 50; i++) {
|
for (i = 0; i < 50; i++) {
|
||||||
af[i].frequency = 0;
|
af[i].frequency = 0;
|
||||||
|
|||||||
+1
-1
@@ -541,7 +541,7 @@ typedef struct _rds_ {
|
|||||||
String stationStatetext;
|
String stationStatetext;
|
||||||
char stationType[18];
|
char stationType[18];
|
||||||
char picode[7];
|
char picode[7];
|
||||||
char stationID[8];
|
char stationID[9];
|
||||||
char stationState[3];
|
char stationState[3];
|
||||||
uint16_t hour, minute, day, month, year, rdsA, rdsB, rdsC, rdsD, rdsErr, rdsStat, correctPI, rdsplusTag1, rdsplusTag2;
|
uint16_t hour, minute, day, month, year, rdsA, rdsB, rdsC, rdsD, rdsErr, rdsStat, correctPI, rdsplusTag1, rdsplusTag2;
|
||||||
uint16_t aid[10];
|
uint16_t aid[10];
|
||||||
|
|||||||
+4
-1
@@ -1,3 +1,5 @@
|
|||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wbool-compare"
|
||||||
#include "rds.h"
|
#include "rds.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
@@ -711,4 +713,5 @@ void ShowAFEON() {
|
|||||||
RadiotextSprite.pushSprite(5, 220);
|
RadiotextSprite.pushSprite(5, 220);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
Reference in New Issue
Block a user