Added RDS error threshold
Possible settings: Off: No errors allowed Small: small errors allowed; possible 1 bit reception error detected; data is corrected Large: large error allowed; theoretical correctable error detected; data is corrected All: All data allowed
This commit is contained in:
+2
-2
@@ -87,7 +87,7 @@ bool screenmute;
|
|||||||
bool screensavertriggered = false;
|
bool screensavertriggered = false;
|
||||||
bool seek;
|
bool seek;
|
||||||
bool setupmode;
|
bool setupmode;
|
||||||
bool showrdserrors;
|
byte showrdserrors;
|
||||||
bool showsquelch;
|
bool showsquelch;
|
||||||
bool softmuteam;
|
bool softmuteam;
|
||||||
bool softmutefm;
|
bool softmutefm;
|
||||||
@@ -3136,7 +3136,7 @@ void DefaultSettings(byte userhardwaremodel) {
|
|||||||
EEPROM.writeByte(EE_BYTE_SOFTMUTEFM, 0);
|
EEPROM.writeByte(EE_BYTE_SOFTMUTEFM, 0);
|
||||||
EEPROM.writeUInt(EE_UINT16_FREQUENCY_AM, 828);
|
EEPROM.writeUInt(EE_UINT16_FREQUENCY_AM, 828);
|
||||||
if (userhardwaremodel == BASE_ILI9341) EEPROM.writeByte(EE_BYTE_LANGUAGE, 0); else EEPROM.writeByte(EE_BYTE_LANGUAGE, LANGUAGE_CHS);
|
if (userhardwaremodel == BASE_ILI9341) EEPROM.writeByte(EE_BYTE_LANGUAGE, 0); else EEPROM.writeByte(EE_BYTE_LANGUAGE, LANGUAGE_CHS);
|
||||||
EEPROM.writeByte(EE_BYTE_SHOWRDSERRORS, 0);
|
EEPROM.writeByte(EE_BYTE_SHOWRDSERRORS, 1);
|
||||||
EEPROM.writeByte(EE_BYTE_TEF, 0);
|
EEPROM.writeByte(EE_BYTE_TEF, 0);
|
||||||
if (userhardwaremodel == BASE_ILI9341) EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, 0); else EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, 1);
|
if (userhardwaremodel == BASE_ILI9341) EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, 0); else EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, 1);
|
||||||
EEPROM.writeByte(EE_BYTE_ROTARYMODE, 0);
|
EEPROM.writeByte(EE_BYTE_ROTARYMODE, 0);
|
||||||
|
|||||||
+32
-27
@@ -343,7 +343,7 @@ bool TEF6686::getStatusAM(int16_t &level, uint16_t &noise, uint16_t &cochannel,
|
|||||||
return snr;
|
return snr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TEF6686::readRDS(bool showrdserrors)
|
void TEF6686::readRDS(byte showrdserrors)
|
||||||
{
|
{
|
||||||
uint16_t rdsStat;
|
uint16_t rdsStat;
|
||||||
uint8_t offset;
|
uint8_t offset;
|
||||||
@@ -376,17 +376,22 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
rds.rdsCerror = (((rds.rdsErr >> 10) & 0x03) > 0);
|
rds.rdsCerror = (((rds.rdsErr >> 10) & 0x03) > 0);
|
||||||
rds.rdsDerror = (((rds.rdsErr >> 8) & 0x03) > 0);
|
rds.rdsDerror = (((rds.rdsErr >> 8) & 0x03) > 0);
|
||||||
|
|
||||||
|
rdsAerrorThreshold = (((rds.rdsErr >> 14) & 0x03) > showrdserrors);
|
||||||
|
rdsBerrorThreshold = (((rds.rdsErr >> 12) & 0x03) > showrdserrors);
|
||||||
|
rdsCerrorThreshold = (((rds.rdsErr >> 10) & 0x03) > showrdserrors);
|
||||||
|
rdsDerrorThreshold = (((rds.rdsErr >> 8) & 0x03) > showrdserrors);
|
||||||
|
|
||||||
if ((rdsStat & (1 << 15))) rdsReady = true;
|
if ((rdsStat & (1 << 15))) rdsReady = true;
|
||||||
|
|
||||||
if (rdsReady) { // We have all data to decode... let's go...
|
if (rdsReady) { // We have all data to decode... let's go...
|
||||||
|
|
||||||
//PI decoder
|
//PI decoder
|
||||||
if (!rds.rdsAerror && afreset) {
|
if (!rdsAerrorThreshold && afreset) {
|
||||||
rds.correctPI = rds.rdsA;
|
rds.correctPI = rds.rdsA;
|
||||||
afreset = false;
|
afreset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rds.region != 1 && ((!rds.rdsAerror && !rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) || (rds.pierrors && !errorfreepi))) {
|
if (rds.region != 1 && ((!rdsAerrorThreshold && !rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) || (rds.pierrors && !errorfreepi))) {
|
||||||
if (rds.rdsA != piold) {
|
if (rds.rdsA != piold) {
|
||||||
piold = rds.rdsA;
|
piold = rds.rdsA;
|
||||||
rds.picode[0] = (rds.rdsA >> 12) & 0xF;
|
rds.picode[0] = (rds.rdsA >> 12) & 0xF;
|
||||||
@@ -402,7 +407,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rds.rdsAerror && !rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) errorfreepi = true;
|
if (!rdsAerrorThreshold && !rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) errorfreepi = true;
|
||||||
|
|
||||||
if (!errorfreepi) {
|
if (!errorfreepi) {
|
||||||
if (((rds.rdsErr >> 14) & 0x03) > 2) rds.picode[5] = '?'; else rds.picode[5] = ' ';
|
if (((rds.rdsErr >> 14) & 0x03) > 2) rds.picode[5] = '?'; else rds.picode[5] = ' ';
|
||||||
@@ -470,13 +475,13 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
// TP Indicator
|
// TP Indicator
|
||||||
rds.hasTP = (bitRead(rds.rdsB, 10));
|
rds.hasTP = (bitRead(rds.rdsB, 10));
|
||||||
|
|
||||||
if (!rds.rdsBerror) rdsblock = rds.rdsB >> 11; else return;
|
if (!rdsBerrorThreshold) rdsblock = rds.rdsB >> 11; else return;
|
||||||
switch (rdsblock) {
|
switch (rdsblock) {
|
||||||
case RDS_GROUP_0A:
|
case RDS_GROUP_0A:
|
||||||
case RDS_GROUP_0B:
|
case RDS_GROUP_0B:
|
||||||
{
|
{
|
||||||
//PS decoder
|
//PS decoder
|
||||||
if (showrdserrors || (!rds.rdsBerror && !rds.rdsDerror)) {
|
if (showrdserrors == 3 || (!rdsBerrorThreshold && !rdsDerrorThreshold)) {
|
||||||
offset = rds.rdsB & 0x03; // Let's get the character offset for PS
|
offset = rds.rdsB & 0x03; // Let's get the character offset for PS
|
||||||
|
|
||||||
ps_buffer2[(offset * 2) + 0] = ps_buffer[(offset * 2) + 0]; // Make a copy of the PS buffer
|
ps_buffer2[(offset * 2) + 0] = ps_buffer[(offset * 2) + 0]; // Make a copy of the PS buffer
|
||||||
@@ -509,7 +514,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PTY decoder
|
// PTY decoder
|
||||||
if (!rds.rdsBerror) {
|
if (!rdsBerrorThreshold) {
|
||||||
rds.stationTypeCode = (rds.rdsB >> 5) & 0x1F; // Get 5 PTY bits from Block B
|
rds.stationTypeCode = (rds.rdsB >> 5) & 0x1F; // Get 5 PTY bits from Block B
|
||||||
if (rds.region == 0) strcpy(rds.stationType, PTY_EU[rds.stationTypeCode]);
|
if (rds.region == 0) strcpy(rds.stationType, PTY_EU[rds.stationTypeCode]);
|
||||||
if (rds.region == 1) strcpy(rds.stationType, PTY_USA[rds.stationTypeCode]);
|
if (rds.region == 1) strcpy(rds.stationType, PTY_USA[rds.stationTypeCode]);
|
||||||
@@ -519,9 +524,9 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
|
|
||||||
//MS decoder
|
//MS decoder
|
||||||
if (((bitRead(rds.rdsB, 3)) & 0x1F) == 1) rds.MS = 1; else rds.MS = 2; // Read MS flag
|
if (((bitRead(rds.rdsB, 3)) & 0x1F) == 1) rds.MS = 1; else rds.MS = 2; // Read MS flag
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rds.rdsCerror) {
|
if (!rdsCerrorThreshold) {
|
||||||
//AF decoder
|
//AF decoder
|
||||||
if (rdsblock == 0) { // Only when in GROUP 0A
|
if (rdsblock == 0) { // Only when in GROUP 0A
|
||||||
if (((rds.rdsC >> 8) > 0 && (rds.rdsC >> 8) > 224) && ((rds.rdsC >> 8) > 0 && (rds.rdsC >> 8) < 250)) afinit = true;
|
if (((rds.rdsC >> 8) > 0 && (rds.rdsC >> 8) > 224) && ((rds.rdsC >> 8) > 0 && (rds.rdsC >> 8) < 250)) afinit = true;
|
||||||
@@ -591,7 +596,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_1A: {
|
case RDS_GROUP_1A: {
|
||||||
if (!rds.rdsCerror) {
|
if (!rdsCerrorThreshold) {
|
||||||
if (rds.rdsC >> 12 == 0) { // ECC code readout
|
if (rds.rdsC >> 12 == 0) { // ECC code readout
|
||||||
rds.ECC = rds.rdsC & 0xff;
|
rds.ECC = rds.rdsC & 0xff;
|
||||||
rds.hasECC = true;
|
rds.hasECC = true;
|
||||||
@@ -601,9 +606,9 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
rds.LIC = rds.rdsC & 0xff;
|
rds.LIC = rds.rdsC & 0xff;
|
||||||
rds.hasLIC = true;
|
rds.hasLIC = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rds.rdsDerror) {
|
if (!rdsDerrorThreshold) {
|
||||||
if (rds.rdsD != 0) { // PIN decoder
|
if (rds.rdsD != 0) { // PIN decoder
|
||||||
rds.hasPIN = true;
|
rds.hasPIN = true;
|
||||||
rds.pinMin = rds.rdsD & 0x3f;
|
rds.pinMin = rds.rdsD & 0x3f;
|
||||||
@@ -614,7 +619,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_2A: {
|
case RDS_GROUP_2A: {
|
||||||
if (showrdserrors || (!rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror)) {
|
if (showrdserrors == 3 || (!rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold)) {
|
||||||
// RT decoder (64 characters)
|
// RT decoder (64 characters)
|
||||||
rds.hasRT = true;
|
rds.hasRT = true;
|
||||||
rds.rtAB = (bitRead(rds.rdsB, 4)); // Get AB flag
|
rds.rtAB = (bitRead(rds.rdsB, 4)); // Get AB flag
|
||||||
@@ -658,7 +663,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_2B: {
|
case RDS_GROUP_2B: {
|
||||||
if (showrdserrors || (!rds.rdsBerror && !rds.rdsDerror)) {
|
if (showrdserrors == 3 || (!rdsBerrorThreshold && !rdsDerrorThreshold)) {
|
||||||
// RT decoder (32 characters)
|
// RT decoder (32 characters)
|
||||||
rds.hasRT = true;
|
rds.hasRT = true;
|
||||||
rds.rtAB32 = (bitRead(rds.rdsB, 4)); // Get AB flag
|
rds.rtAB32 = (bitRead(rds.rdsB, 4)); // Get AB flag
|
||||||
@@ -683,17 +688,17 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_3A: {
|
case RDS_GROUP_3A: {
|
||||||
if (!rds.rdsDerror) {
|
if (!rdsDerrorThreshold) {
|
||||||
// RT+ init
|
// RT+ init
|
||||||
if (rds.rdsD == 0x4BD7) { // Check for RT+ application
|
if (rds.rdsD == 0x4BD7) { // Check for RT+ application
|
||||||
rds.hasRDSplus = true; // Set flag
|
rds.hasRDSplus = true; // Set flag
|
||||||
rtplusblock = ((rds.rdsB & 0x1F) >> 1) * 2; // Get RT+ Block
|
rtplusblock = ((rds.rdsB & 0x1F) >> 1) * 2; // Get RT+ Block
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_4A: {
|
case RDS_GROUP_4A: {
|
||||||
if (!rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) {
|
if (!rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) {
|
||||||
// CT
|
// CT
|
||||||
uint32_t mjd;
|
uint32_t mjd;
|
||||||
mjd = (rds.rdsB & 0x03);
|
mjd = (rds.rdsB & 0x03);
|
||||||
@@ -725,7 +730,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case RDS_GROUP_10A: {
|
case RDS_GROUP_10A: {
|
||||||
if (!rds.rdsCerror && !rds.rdsDerror) {
|
if (!rdsCerrorThreshold && !rdsDerrorThreshold) {
|
||||||
// PTYN
|
// PTYN
|
||||||
offset = bitRead(rds.rdsB, 0); // Get char offset
|
offset = bitRead(rds.rdsB, 0); // Get char offset
|
||||||
|
|
||||||
@@ -748,7 +753,7 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
case RDS_GROUP_12A:
|
case RDS_GROUP_12A:
|
||||||
case RDS_GROUP_13A: {
|
case RDS_GROUP_13A: {
|
||||||
// RT+ decoding
|
// RT+ decoding
|
||||||
if ((!rds.rdsBerror && !rds.rdsCerror && !rds.rdsDerror) && rtplusblock == rdsblock && rds.hasRDSplus) { // Are we in the right RT+ block and is all ok to go?
|
if ((!rdsBerrorThreshold && !rdsCerrorThreshold && !rdsDerrorThreshold) && rtplusblock == rdsblock && rds.hasRDSplus) { // Are we in the right RT+ block and is all ok to go?
|
||||||
rds.rdsplusTag1 = ((rds.rdsB & 0x07) << 3) + (rds.rdsC >> 13);
|
rds.rdsplusTag1 = ((rds.rdsB & 0x07) << 3) + (rds.rdsC >> 13);
|
||||||
rds.rdsplusTag2 = ((rds.rdsC & 0x01) << 5) + (rds.rdsD >> 11);
|
rds.rdsplusTag2 = ((rds.rdsC & 0x01) << 5) + (rds.rdsD >> 11);
|
||||||
uint16_t start_marker_1 = (rds.rdsC >> 7) & 0x3F;
|
uint16_t start_marker_1 = (rds.rdsC >> 7) & 0x3F;
|
||||||
@@ -797,13 +802,13 @@ void TEF6686::readRDS(bool showrdserrors)
|
|||||||
rds.RTContent2 = convertToUTF8(RTtext2); // Convert RDS characterset to ASCII
|
rds.RTContent2 = convertToUTF8(RTtext2); // Convert RDS characterset to ASCII
|
||||||
rds.RTContent2 = extractUTF8Substring(rds.RTContent2, 0, 44, false); // Make sure RT does not exceed 32 characters
|
rds.RTContent2 = extractUTF8Substring(rds.RTContent2, 0, 44, false); // Make sure RT does not exceed 32 characters
|
||||||
}
|
}
|
||||||
if (!rds.rdsBerror && rdsblock == 16 && (rds.rdsB & (1 << 4))) rds.hasTMC = true; // TMC flag
|
if (!rdsBerrorThreshold && rdsblock == 16 && (rds.rdsB & (1 << 4))) rds.hasTMC = true; // TMC flag
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDS_GROUP_14A: {
|
case RDS_GROUP_14A: {
|
||||||
// EON
|
// EON
|
||||||
if (!rds.rdsDerror) {
|
if (!rdsDerrorThreshold) {
|
||||||
rds.hasEON = true; // Group is there, so we have EON
|
rds.hasEON = true; // Group is there, so we have EON
|
||||||
|
|
||||||
bool isValuePresent = false;
|
bool isValuePresent = false;
|
||||||
|
|||||||
+6
-2
@@ -49,7 +49,7 @@ enum RADIO_BATTERY_SELECTION {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum RADIO_FM_DEEMPHASIS {
|
enum RADIO_FM_DEEMPHASIS {
|
||||||
DEEMPHASIS_NONE = 0, DEEMPHASIS_50, DEEMPHASIS_75,
|
DEEMPHASIS_NONE = 0, DEEMPHASIS_50, DEEMPHASIS_75,
|
||||||
DEEMPHASIS_COUNT
|
DEEMPHASIS_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ class TEF6686 {
|
|||||||
logbook_ logbook[22];
|
logbook_ logbook[22];
|
||||||
uint16_t TestAF();
|
uint16_t TestAF();
|
||||||
void TestAFEON();
|
void TestAFEON();
|
||||||
void readRDS(bool showrdserrors);
|
void readRDS(byte showrdserrors);
|
||||||
void SetFreq(uint16_t frequency);
|
void SetFreq(uint16_t frequency);
|
||||||
void SetFreqAM(uint16_t frequency);
|
void SetFreqAM(uint16_t frequency);
|
||||||
bool getProcessing(uint16_t &highcut, uint16_t &stereo, uint16_t &sthiblend, uint8_t &stband_1, uint8_t &stband_2, uint8_t &stband_3, uint8_t &stband_4);
|
bool getProcessing(uint16_t &highcut, uint16_t &stereo, uint16_t &sthiblend, uint8_t &stband_1, uint8_t &stband_2, uint8_t &stband_3, uint8_t &stband_4);
|
||||||
@@ -293,6 +293,10 @@ class TEF6686 {
|
|||||||
bool initab;
|
bool initab;
|
||||||
bool afinit;
|
bool afinit;
|
||||||
bool errorfreepi;
|
bool errorfreepi;
|
||||||
|
bool rdsAerrorThreshold;
|
||||||
|
bool rdsBerrorThreshold;
|
||||||
|
bool rdsCerrorThreshold;
|
||||||
|
bool rdsDerrorThreshold;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+60
-12
@@ -458,7 +458,13 @@ void BuildMenu() {
|
|||||||
tftPrint(-1, myLanguage[language][176], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(-1, myLanguage[language][176], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||||
tftPrint(-1, myLanguage[language][196], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(-1, myLanguage[language][196], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
if (showrdserrors) tftPrint(1, myLanguage[language][42], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
switch (showrdserrors) {
|
||||||
|
case 0: tftPrint(1, myLanguage[language][30], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||||
|
case 1: tftPrint(1, myLanguage[language][200], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||||
|
case 2: tftPrint(1, myLanguage[language][201], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||||
|
case 3: tftPrint(1, myLanguage[language][202], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
|
||||||
|
}
|
||||||
|
|
||||||
if (region == REGION_EU) tftPrint(1, myLanguage[language][47], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
if (region == REGION_EU) tftPrint(1, myLanguage[language][47], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
if (region == REGION_US) tftPrint(1, myLanguage[language][48], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
if (region == REGION_US) tftPrint(1, myLanguage[language][48], 310, ITEM2 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
if (radio.rds.underscore) tftPrint(1, myLanguage[language][42], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
if (radio.rds.underscore) tftPrint(1, myLanguage[language][42], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM3 + 6, PrimaryColor, PrimaryColorSmooth, 16);
|
||||||
@@ -1016,9 +1022,21 @@ void MenuUp() {
|
|||||||
case RDSSETTINGS:
|
case RDSSETTINGS:
|
||||||
switch (menuoption) {
|
switch (menuoption) {
|
||||||
case ITEM1:
|
case ITEM1:
|
||||||
if (showrdserrors) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
switch (showrdserrors) {
|
||||||
if (showrdserrors) showrdserrors = false; else showrdserrors = true;
|
case 0: tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
if (showrdserrors) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
case 1: tftPrint(0, myLanguage[language][200], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
case 2: tftPrint(0, myLanguage[language][201], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
case 3: tftPrint(0, myLanguage[language][202], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
}
|
||||||
|
showrdserrors++;
|
||||||
|
if (showrdserrors > 3) showrdserrors = 0;
|
||||||
|
|
||||||
|
switch (showrdserrors) {
|
||||||
|
case 0: tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 1: tftPrint(0, myLanguage[language][200], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 2: tftPrint(0, myLanguage[language][201], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 3: tftPrint(0, myLanguage[language][202], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ITEM2:
|
case ITEM2:
|
||||||
@@ -1028,8 +1046,14 @@ void MenuUp() {
|
|||||||
if (region == REGION_EU) tftPrint(0, myLanguage[language][47], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
if (region == REGION_EU) tftPrint(0, myLanguage[language][47], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||||
if (region == REGION_US) tftPrint(0, myLanguage[language][48], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
if (region == REGION_US) tftPrint(0, myLanguage[language][48], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||||
regionold = region;
|
regionold = region;
|
||||||
if (region == REGION_EU) { fmdeemphasis = DEEMPHASIS_50; radio.setDeemphasis(fmdeemphasis); }
|
if (region == REGION_EU) {
|
||||||
if (region == REGION_US) { fmdeemphasis = DEEMPHASIS_75; radio.setDeemphasis(fmdeemphasis); }
|
fmdeemphasis = DEEMPHASIS_50;
|
||||||
|
radio.setDeemphasis(fmdeemphasis);
|
||||||
|
}
|
||||||
|
if (region == REGION_US) {
|
||||||
|
fmdeemphasis = DEEMPHASIS_75;
|
||||||
|
radio.setDeemphasis(fmdeemphasis);
|
||||||
|
}
|
||||||
radio.rds.region = region;
|
radio.rds.region = region;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1510,9 +1534,21 @@ void MenuDown() {
|
|||||||
case RDSSETTINGS:
|
case RDSSETTINGS:
|
||||||
switch (menuoption) {
|
switch (menuoption) {
|
||||||
case ITEM1:
|
case ITEM1:
|
||||||
if (showrdserrors) tftPrint(0, myLanguage[language][42], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
|
switch (showrdserrors) {
|
||||||
if (showrdserrors) showrdserrors = false; else showrdserrors = true;
|
case 0: tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
if (showrdserrors) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
case 1: tftPrint(0, myLanguage[language][200], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
case 2: tftPrint(0, myLanguage[language][201], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
case 3: tftPrint(0, myLanguage[language][202], 155, 118, BackgroundColor, BackgroundColor, 28); break;
|
||||||
|
}
|
||||||
|
showrdserrors--;
|
||||||
|
if (showrdserrors > 3) showrdserrors = 3;
|
||||||
|
|
||||||
|
switch (showrdserrors) {
|
||||||
|
case 0: tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 1: tftPrint(0, myLanguage[language][200], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 2: tftPrint(0, myLanguage[language][201], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 3: tftPrint(0, myLanguage[language][202], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ITEM2:
|
case ITEM2:
|
||||||
@@ -1522,8 +1558,14 @@ void MenuDown() {
|
|||||||
if (region == REGION_EU) tftPrint(0, myLanguage[language][47], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
if (region == REGION_EU) tftPrint(0, myLanguage[language][47], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||||
if (region == REGION_US) tftPrint(0, myLanguage[language][48], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
if (region == REGION_US) tftPrint(0, myLanguage[language][48], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
||||||
regionold = region;
|
regionold = region;
|
||||||
if (region == REGION_EU) { fmdeemphasis = DEEMPHASIS_50; radio.setDeemphasis(fmdeemphasis); }
|
if (region == REGION_EU) {
|
||||||
if (region == REGION_US) { fmdeemphasis = DEEMPHASIS_75; radio.setDeemphasis(fmdeemphasis); }
|
fmdeemphasis = DEEMPHASIS_50;
|
||||||
|
radio.setDeemphasis(fmdeemphasis);
|
||||||
|
}
|
||||||
|
if (region == REGION_US) {
|
||||||
|
fmdeemphasis = DEEMPHASIS_75;
|
||||||
|
radio.setDeemphasis(fmdeemphasis);
|
||||||
|
}
|
||||||
radio.rds.region = region;
|
radio.rds.region = region;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2002,7 +2044,13 @@ void DoMenu() {
|
|||||||
switch (menuoption) {
|
switch (menuoption) {
|
||||||
case ITEM1:
|
case ITEM1:
|
||||||
tftPrint(0, myLanguage[language][38], 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(0, myLanguage[language][38], 155, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||||
if (showrdserrors) tftPrint(0, myLanguage[language][42], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
|
switch (showrdserrors) {
|
||||||
|
case 0: tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 1: tftPrint(0, myLanguage[language][200], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 2: tftPrint(0, myLanguage[language][201], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
case 3: tftPrint(0, myLanguage[language][202], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ITEM2:
|
case ITEM2:
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ extern bool rdsreset;
|
|||||||
extern bool RDSstatus;
|
extern bool RDSstatus;
|
||||||
extern bool RDSstatusold;
|
extern bool RDSstatusold;
|
||||||
extern bool rdsstereoold;
|
extern bool rdsstereoold;
|
||||||
extern bool showrdserrors;
|
extern byte showrdserrors;
|
||||||
extern bool showsquelch;
|
extern bool showsquelch;
|
||||||
extern bool softmuteam;
|
extern bool softmuteam;
|
||||||
extern bool softmutefm;
|
extern bool softmutefm;
|
||||||
|
|||||||
+65
-17
@@ -1,6 +1,6 @@
|
|||||||
// [number of languages][number of texts]
|
// [number of languages][number of texts]
|
||||||
|
|
||||||
static const char* const myLanguage[16][200] = {
|
static const char* const myLanguage[16][203] = {
|
||||||
{ "English", // English
|
{ "English", // English
|
||||||
"Rotary direction changed", // 1
|
"Rotary direction changed", // 1
|
||||||
"Please release button", // 2
|
"Please release button", // 2
|
||||||
@@ -200,7 +200,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Nederlands", // Dutch
|
{ "Nederlands", // Dutch
|
||||||
@@ -402,7 +405,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto AF sorteren", // 196
|
"Auto AF sorteren", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Laag", // 200
|
||||||
|
"Middel", // 201
|
||||||
|
"Alles" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Polski", // Polish
|
{ "Polski", // Polish
|
||||||
@@ -604,7 +610,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Automat. sortowanie AF", // 196
|
"Automat. sortowanie AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Hrvatski", // Croatian
|
{ "Hrvatski", // Croatian
|
||||||
@@ -806,7 +815,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Ελληνικά", // Greek
|
{ "Ελληνικά", // Greek
|
||||||
@@ -1008,7 +1020,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Αυτόματη ταξινόμηση AF", // 196
|
"Αυτόματη ταξινόμηση AF", // 196
|
||||||
"ID λίστας σταθμών", // 197
|
"ID λίστας σταθμών", // 197
|
||||||
"AM εξασθένιση", // 198
|
"AM εξασθένιση", // 198
|
||||||
"FM αποέμφαση" // 199
|
"FM αποέμφαση", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Romana", // Romanian
|
{ "Romana", // Romanian
|
||||||
@@ -1210,7 +1225,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Deutsch", // German
|
{ "Deutsch", // German
|
||||||
@@ -1412,7 +1430,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Czech", // Czech
|
{ "Czech", // Czech
|
||||||
@@ -1614,7 +1635,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Slovak", // Slovak
|
{ "Slovak", // Slovak
|
||||||
@@ -1816,7 +1840,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Français", // French
|
{ "Français", // French
|
||||||
@@ -2018,7 +2045,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Български", // Bulgarian
|
{ "Български", // Bulgarian
|
||||||
@@ -2220,7 +2250,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Русский", // Russian
|
{ "Русский", // Russian
|
||||||
@@ -2422,7 +2455,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Українська", // Ukranian
|
{ "Українська", // Ukranian
|
||||||
@@ -2624,7 +2660,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Italiano", // Italian
|
{ "Italiano", // Italian
|
||||||
@@ -2826,7 +2865,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Simplified Chinese", // Simplified Chinese
|
{ "Simplified Chinese", // Simplified Chinese
|
||||||
@@ -3028,7 +3070,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"自动排列AF", // 196
|
"自动排列AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM天线衰减", // 198
|
"AM天线衰减", // 198
|
||||||
"FM去加重" // 199
|
"FM去加重", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "Norsk", // Norwegian
|
{ "Norsk", // Norwegian
|
||||||
@@ -3230,7 +3275,10 @@ static const char* const myLanguage[16][200] = {
|
|||||||
"Auto sort AF", // 196
|
"Auto sort AF", // 196
|
||||||
"Stationlist ID", // 197
|
"Stationlist ID", // 197
|
||||||
"AM ATT", // 198
|
"AM ATT", // 198
|
||||||
"FM deemphasis" // 199
|
"FM deemphasis", // 199
|
||||||
|
"Small", // 200
|
||||||
|
"Large", // 201
|
||||||
|
"All" // 202
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ extern bool RDSstatus;
|
|||||||
extern bool rdsstereoold;
|
extern bool rdsstereoold;
|
||||||
extern bool screenmute;
|
extern bool screenmute;
|
||||||
extern bool setupmode;
|
extern bool setupmode;
|
||||||
extern bool showrdserrors;
|
extern byte showrdserrors;
|
||||||
extern bool TAold;
|
extern bool TAold;
|
||||||
extern bool TPold;
|
extern bool TPold;
|
||||||
extern bool wifi;
|
extern bool wifi;
|
||||||
|
|||||||
Reference in New Issue
Block a user