Added time-out timer

You can choose for off, 15m, 30m, 60m and 90m.
Timer will reset everytime you use a button or the rotary.
Radio will go in full deep-sleep, including the processor.
To wake up, just jiggle the knob.
This commit is contained in:
Sjef Verhoeven PE5PVB
2023-10-15 20:17:09 +02:00
parent 508a4c9f0a
commit 51576b316f
5 changed files with 324 additions and 645 deletions
+214 -217
View File
@@ -76,7 +76,6 @@ bool memorystore;
bool menu; bool menu;
bool menuopen; bool menuopen;
bool nobattery; bool nobattery;
bool power = true;
bool rdsflagreset; bool rdsflagreset;
bool rdsreset; bool rdsreset;
bool RDSSPYTCP; bool RDSSPYTCP;
@@ -172,6 +171,7 @@ byte StereoLevel;
byte subnetclient; byte subnetclient;
byte TEF; byte TEF;
byte theme; byte theme;
byte tot;
byte tunemode; byte tunemode;
byte unit; byte unit;
char buff[16]; char buff[16];
@@ -333,6 +333,7 @@ unsigned long rtplusticker;
unsigned long rtplustickerhold; unsigned long rtplustickerhold;
unsigned long rtticker; unsigned long rtticker;
unsigned long rttickerhold; unsigned long rttickerhold;
unsigned long tottimer;
unsigned long tuningtimer; unsigned long tuningtimer;
unsigned long udptimer; unsigned long udptimer;
@@ -427,6 +428,7 @@ void setup() {
BWsetAM = EEPROM.readByte(EE_BYTE_BWSET_AM); BWsetAM = EEPROM.readByte(EE_BYTE_BWSET_AM);
nowToggleSWMIBand = EEPROM.readByte(EE_BYTE_BANDAUTOSW); nowToggleSWMIBand = EEPROM.readByte(EE_BYTE_BANDAUTOSW);
radio.rds.fastps = EEPROM.readByte(EE_BYTE_FASTPS); radio.rds.fastps = EEPROM.readByte(EE_BYTE_FASTPS);
tot = EEPROM.readByte(EE_BYTE_TOT);
LWLowEdgeSet = FREQ_LW_LOW_EDGE_MIN; LWLowEdgeSet = FREQ_LW_LOW_EDGE_MIN;
LWHighEdgeSet = FREQ_LW_HIGH_EDGE_MAX; LWHighEdgeSet = FREQ_LW_HIGH_EDGE_MAX;
@@ -698,20 +700,40 @@ void setup() {
ScreensaverTimerInit(); ScreensaverTimerInit();
ScreensaverTimerSet(screensaverOptions[screensaverset]); ScreensaverTimerSet(screensaverOptions[screensaverset]);
} }
tottimer = millis();
} }
void loop() { void loop() {
if (tot != 0) {
unsigned long totprobe = tot * 60000;
if (millis() >= tottimer + totprobe) deepSleep();
}
if (digitalRead(BANDBUTTON) == LOW ) BANDBUTTONPress(); if (digitalRead(BANDBUTTON) == LOW ) BANDBUTTONPress();
if (power || poweroptions == LCD_OFF) { if (millis() >= tuningtimer + 200) {
if (millis() >= tuningtimer + 200) { rdsflagreset = false;
rdsflagreset = false; Communication();
Communication(); }
if (!menu && !afscreen) {
if (af && dropout && millis() >= aftimer + 1000) {
aftimer = millis();
frequency = radio.TestAF();
if (freqold != frequency) {
ShowFreq(0);
if (radio.afmethodB) {
afmethodBold = true;
radio.clearRDS(fullsearchrds);
}
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String(frequency * 10));
store = true;
}
} }
if (!menu && !afscreen) { if (band == BAND_FM && af && radio.rds.correctPI != 0) {
if (af && dropout && millis() >= aftimer + 1000) { if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) {
aftimer = millis(); aftimer = millis();
aftest = false;
frequency = radio.TestAF(); frequency = radio.TestAF();
if (freqold != frequency) { if (freqold != frequency) {
ShowFreq(0); ShowFreq(0);
@@ -724,10 +746,9 @@ void loop() {
} }
} }
if (band == BAND_FM && af && radio.rds.correctPI != 0) { if (band == BAND_FM && millis() >= aftimer + 10000) {
if ((aftest && millis() >= aftimer + 3000) || ((USN > 250 || WAM > 250) && millis() >= aftimer + 1000)) { aftimer = millis();
aftimer = millis(); if (USN > 150 || WAM > 150) {
aftest = false;
frequency = radio.TestAF(); frequency = radio.TestAF();
if (freqold != frequency) { if (freqold != frequency) {
ShowFreq(0); ShowFreq(0);
@@ -739,101 +760,72 @@ void loop() {
store = true; store = true;
} }
} }
if (band == BAND_FM && millis() >= aftimer + 10000) {
aftimer = millis();
if (USN > 150 || WAM > 150) {
frequency = radio.TestAF();
if (freqold != frequency) {
ShowFreq(0);
if (radio.afmethodB) {
afmethodBold = true;
radio.clearRDS(fullsearchrds);
}
if (XDRGTKUSB || XDRGTKTCP) DataPrint("T" + String(frequency * 10));
store = true;
}
}
}
} }
} }
}
if (seek) Seek(direction); if (seek) Seek(direction);
if ((SStatus / 10 > LowLevelSet) && !LowLevelInit && !menu && band < BAND_GAP) { if ((SStatus / 10 > LowLevelSet) && !LowLevelInit && !menu && band < BAND_GAP) {
if (!screenmute && !advancedRDS && !afscreen) { if (!screenmute && !advancedRDS && !afscreen) {
if (showmodulation) { if (showmodulation) {
tftPrint(-1, "10", 27, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "10", 27, 144, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "30", 57, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "30", 57, 144, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "50", 87, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "50", 87, 144, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "70", 117, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "70", 117, 144, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, "100", 164, 144, ActiveColor, ActiveColorSmooth, 16);
tftPrint(0, "M", 7, 128, ActiveColor, ActiveColorSmooth, 16); tftPrint(0, "M", 7, 128, ActiveColor, ActiveColorSmooth, 16);
for (byte segments = 0; segments < 94; segments++) { for (byte segments = 0; segments < 94; segments++) {
if (segments > 54) { if (segments > 54) {
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarSignificantColor); if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarSignificantColor);
} else {
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarInsignificantColor);
}
}
}
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
if (region == REGION_US) tftPrint(-1, "ID:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "PS:", 3, 193, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "RT:", 3, 221, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "PTY:", 3, 163, ActiveColor, ActiveColorSmooth, 16);
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, TFT_DARKGREY);
}
LowLevelInit = true;
}
if ((SStatus / 10 <= LowLevelSet) && band < BAND_GAP) {
if (LowLevelInit && !menu) {
if (!screenmute && !afscreen && !advancedRDS) {
for (byte segments = 0; segments < 94; segments++) {
if (segments > 54) {
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
} else {
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
}
}
if (showmodulation) {
tftPrint(-1, "10", 27, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "30", 57, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "50", 87, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "70", 117, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "100", 164, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(0, "M", 7, 128, GreyoutColor, BackgroundColor, 16);
tft.fillRect(16, 133, 188, 6, GreyoutColor);
}
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
if (region == REGION_US) tftPrint(-1, "ID:", 212, 193, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
tft.drawLine(20, 143, 204, 143, GreyoutColor);
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
}
LowLevelInit = false;
}
if (screenmute || radio.rds.correctPI != 0) readRds();
if (millis() >= lowsignaltimer + 300) {
lowsignaltimer = millis();
if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) {
if (band < BAND_GAP) {
radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
} else { } else {
radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, BarInsignificantColor);
} }
} }
if (!menu) {
doSquelch();
GetData();
}
} }
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
if (region == REGION_US) tftPrint(-1, "ID:", 212, 193, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "PS:", 3, 193, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "RT:", 3, 221, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, "PTY:", 3, 163, ActiveColor, ActiveColorSmooth, 16);
if (!showmodulation) tft.drawLine(20, 143, 204, 143, GreyoutColor); else tft.drawLine(20, 143, 204, 143, TFT_DARKGREY);
}
LowLevelInit = true;
}
} else { if ((SStatus / 10 <= LowLevelSet) && band < BAND_GAP) {
if (LowLevelInit && !menu) {
if (!screenmute && !afscreen && !advancedRDS) {
for (byte segments = 0; segments < 94; segments++) {
if (segments > 54) {
if (((segments - 53) % 10) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
} else {
if (((segments + 1) % 6) == 0) tft.fillRect(16 + (2 * segments), 141, 2, 2, GreyoutColor);
}
}
if (showmodulation) {
tftPrint(-1, "10", 27, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "30", 57, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "50", 87, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "70", 117, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "100", 164, 144, GreyoutColor, BackgroundColor, 16);
tftPrint(0, "M", 7, 128, GreyoutColor, BackgroundColor, 16);
tft.fillRect(16, 133, 188, 6, GreyoutColor);
}
if (region == REGION_EU) tftPrint(-1, "PI:", 212, 193, GreyoutColor, BackgroundColor, 16);
if (region == REGION_US) tftPrint(-1, "ID:", 212, 193, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PS:", 3, 193, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "RT:", 3, 221, GreyoutColor, BackgroundColor, 16);
tftPrint(-1, "PTY:", 3, 163, GreyoutColor, BackgroundColor, 16);
tft.drawLine(20, 143, 204, 143, GreyoutColor);
tft.drawBitmap(122, 5, RDSLogo, 35, 22, GreyoutColor);
}
LowLevelInit = false;
}
if (screenmute || radio.rds.correctPI != 0) readRds();
if (millis() >= lowsignaltimer + 300) {
lowsignaltimer = millis();
if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) { if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) {
if (band < BAND_GAP) { if (band < BAND_GAP) {
radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
@@ -843,97 +835,106 @@ void loop() {
} }
if (!menu) { if (!menu) {
doSquelch(); doSquelch();
if (millis() >= tuningtimer + 200) readRds();
GetData(); GetData();
if (!screenmute && !afscreen && !advancedRDS) ShowModLevel();
} }
} }
if (menu && menuopen && menupage == FMSETTINGS && menuoption == ITEM4) { } else {
if (band < BAND_GAP) radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); else radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN); if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) {
if (millis() >= lowsignaltimer + 500 || change2) { if (band < BAND_GAP) {
lowsignaltimer = millis(); radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
change2 = false;
if (SStatus > SStatusold || SStatus < SStatusold) {
if (SStatusold / 10 != SStatus / 10) tftReplace(1, String(SStatusold / 10), String(SStatus / 10), 140, 149, PrimaryColor, PrimaryColorSmooth, 48);
tftReplace(1, "." + String(abs(SStatusold % 10)), "." + String(abs(SStatus % 10)), 160, 149, PrimaryColor, PrimaryColorSmooth, 28);
SStatusold = SStatus;
}
}
}
if (rotary == -1) {
if (screensavertriggered) {
if (!touchrotating) {
rotary = 0;
WakeToSleep(REVERSE);
}
} else { } else {
KeyUp(); radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
if (screensaverset && !menu && !screensavertriggered) ScreensaverTimerRestart();
} }
} }
if (rotary == 1) { if (!menu) {
if (screensavertriggered) { doSquelch();
if (!touchrotating) { if (millis() >= tuningtimer + 200) readRds();
rotary = 0; GetData();
WakeToSleep(REVERSE); if (!screenmute && !afscreen && !advancedRDS) ShowModLevel();
}
} else {
KeyDown();
if (screensaverset && !menu && !screensavertriggered) ScreensaverTimerRestart();
}
} }
}
if (digitalRead(ROTARY_BUTTON) == LOW) if (!afscreen) ButtonPress(); if (menu && menuopen && menupage == FMSETTINGS && menuoption == ITEM4) {
if (digitalRead(MODEBUTTON) == LOW && !screenmute) ModeButtonPress(); if (band < BAND_GAP) radio.getStatus(SStatus, USN, WAM, OStatus, BW, MStatus, CN); else radio.getStatusAM(SStatus, USN, WAM, OStatus, BW, MStatus, CN);
if (digitalRead(BWBUTTON) == LOW && !screenmute) if (!afscreen) BWButtonPress(); if (millis() >= lowsignaltimer + 500 || change2) {
lowsignaltimer = millis();
if (store) change++; change2 = false;
if (SStatus > SStatusold || SStatus < SStatusold) {
if (change > 200 && store) { if (SStatusold / 10 != SStatus / 10) tftReplace(1, String(SStatusold / 10), String(SStatus / 10), 140, 149, PrimaryColor, PrimaryColorSmooth, 48);
detachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A)); tftReplace(1, "." + String(abs(SStatusold % 10)), "." + String(abs(SStatus % 10)), 160, 149, PrimaryColor, PrimaryColorSmooth, 28);
detachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B)); SStatusold = SStatus;
EEPROM.writeUInt(EE_UINT16_FREQUENCY_FM, frequency);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_OIRT, frequency_OIRT);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_AM, frequency_AM);
EEPROM.writeByte(EE_BYTE_BAND, band);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_LW, frequency_LW);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_MW, frequency_MW);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_SW, frequency_SW);
EEPROM.commit();
store = false;
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A), read_encoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B), read_encoder, CHANGE);
}
if (screensaverset) {
if (screensaver_IRQ)
{
screensaver_IRQ = OFF;
if (!screensavertriggered && !advancedRDS && !menu) {
WakeToSleep(true);
}
} }
} }
} }
if (!power) { if (rotary == -1) {
if (rotary == -1) { tottimer = millis();
if (screensavertriggered) {
if (!touchrotating) { if (!touchrotating) {
rotary = 0; rotary = 0;
WakeToSleep(REVERSE); WakeToSleep(REVERSE);
} else {
KeyUp();
} }
} else {
KeyUp();
if (screensaverset && !menu && !screensavertriggered) ScreensaverTimerRestart();
} }
}
if (rotary == 1) { if (rotary == 1) {
tottimer = millis();
if (screensavertriggered) {
if (!touchrotating) { if (!touchrotating) {
rotary = 0; rotary = 0;
WakeToSleep(REVERSE); WakeToSleep(REVERSE);
} else { }
KeyDown(); } else {
KeyDown();
if (screensaverset && !menu && !screensavertriggered) ScreensaverTimerRestart();
}
}
if (digitalRead(ROTARY_BUTTON) == LOW) {
tottimer = millis();
if (screensavertriggered && !touchrotating) WakeToSleep(REVERSE);
if (!afscreen) ButtonPress();
}
if (digitalRead(MODEBUTTON) == LOW) {
tottimer = millis();
if (screensavertriggered && !touchrotating) WakeToSleep(REVERSE);
if (!screenmute) ModeButtonPress();
}
if (digitalRead(BWBUTTON) == LOW) {
tottimer = millis();
if (screensavertriggered && !touchrotating) WakeToSleep(REVERSE);
if (!screenmute && !afscreen) BWButtonPress();
}
if (store) change++;
if (change > 200 && store) {
detachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A));
detachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B));
EEPROM.writeUInt(EE_UINT16_FREQUENCY_FM, frequency);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_OIRT, frequency_OIRT);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_AM, frequency_AM);
EEPROM.writeByte(EE_BYTE_BAND, band);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_LW, frequency_LW);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_MW, frequency_MW);
EEPROM.writeUInt(EE_UINT16_FREQUENCY_SW, frequency_SW);
EEPROM.commit();
store = false;
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A), read_encoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B), read_encoder, CHANGE);
}
if (screensaverset) {
if (screensaver_IRQ)
{
screensaver_IRQ = OFF;
if (!screensavertriggered && !advancedRDS && !menu) {
WakeToSleep(true);
} }
} }
} }
@@ -968,15 +969,7 @@ void WakeToSleep(bool yes) {
if (yes) { if (yes) {
screensavertriggered = true; screensavertriggered = true;
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP:
power = false;
analogWrite(SMETERPIN, 0);
MuteScreen(1);
StoreFrequency();
radio.power(1);
break;
case LCD_OFF: case LCD_OFF:
power = false;
analogWrite(SMETERPIN, 0); analogWrite(SMETERPIN, 0);
MuteScreen(1); MuteScreen(1);
StoreFrequency(); StoreFrequency();
@@ -996,11 +989,7 @@ void WakeToSleep(bool yes) {
} }
} else { } else {
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP:
ESP.restart();
break;
case LCD_OFF: case LCD_OFF:
power = true;
pinMode (STANDBYLED, OUTPUT); pinMode (STANDBYLED, OUTPUT);
digitalWrite(STANDBYLED, LOW); digitalWrite(STANDBYLED, LOW);
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27); analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
@@ -1227,53 +1216,50 @@ void ToggleBand(byte nowBand) {
} }
void BANDBUTTONPress() { void BANDBUTTONPress() {
if (!power) { if (screensavertriggered) WakeToSleep(REVERSE);
if (screensavertriggered) WakeToSleep(REVERSE); if (afscreen) {
BuildAdvancedRDS();
} else { } else {
if (afscreen) { unsigned long counterold = millis();
BuildAdvancedRDS(); unsigned long counter = millis();
} else { if (!menu) {
unsigned long counterold = millis(); while (digitalRead(BANDBUTTON) == LOW && counter - counterold <= 1000) counter = millis();
unsigned long counter = millis();
if (!menu && power) {
while (digitalRead(BANDBUTTON) == LOW && counter - counterold <= 1000) counter = millis();
if (counter - counterold < 1000) { if (counter - counterold < 1000) {
if (screensavertriggered) { if (screensavertriggered) {
WakeToSleep(REVERSE); WakeToSleep(REVERSE);
return; return;
} }
if (advancedRDS) { if (advancedRDS) {
BuildDisplay(); BuildDisplay();
ScreensaverTimerReopen(); ScreensaverTimerReopen();
} else {
if (tunemode != TUNE_MEM) {
ToggleBand(band);
StoreFrequency();
SelectBand();
if (XDRGTKUSB || XDRGTKTCP) {
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
}
}
ScreensaverTimerRestart();
}
} else { } else {
if (screensavertriggered) { if (tunemode != TUNE_MEM) {
WakeToSleep(REVERSE); ToggleBand(band);
return; StoreFrequency();
SelectBand();
if (XDRGTKUSB || XDRGTKTCP) {
if (band == BAND_FM) DataPrint("M0\nT" + String(frequency * 10)); else if (band == BAND_OIRT) DataPrint("M0\nT" + String(frequency_OIRT * 10)); else DataPrint("M1\nT" + String(frequency_AM));
}
} }
ScreensaverTimerRestart();
}
} else {
if (screensavertriggered) {
WakeToSleep(REVERSE);
return;
}
if (band < BAND_GAP) { if (band < BAND_GAP) {
if (advancedRDS && !seek) BuildAFScreen(); else BuildAdvancedRDS(); if (advancedRDS && !seek) BuildAFScreen(); else BuildAdvancedRDS();
} else { } else {
WakeToSleep(true); WakeToSleep(true);
}
} }
} }
while (digitalRead(BANDBUTTON) == LOW) delay(50);
delay(100);
} }
while (digitalRead(BANDBUTTON) == LOW) delay(50);
delay(100);
} }
} }
@@ -1861,6 +1847,7 @@ void ModeButtonPress() {
EEPROM.writeByte(EE_BYTE_STATIONLISTID, stationlistid); EEPROM.writeByte(EE_BYTE_STATIONLISTID, stationlistid);
EEPROM.writeByte(EE_BYTE_FM_DEEMPHASIS, fmdeemphasis); EEPROM.writeByte(EE_BYTE_FM_DEEMPHASIS, fmdeemphasis);
EEPROM.writeByte(EE_BYTE_FASTPS, radio.rds.fastps); EEPROM.writeByte(EE_BYTE_FASTPS, radio.rds.fastps);
EEPROM.writeByte(EE_BYTE_TOT, tot);
EEPROM.commit(); EEPROM.commit();
Serial.end(); Serial.end();
if (wifi) remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient); if (wifi) remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
@@ -3339,6 +3326,7 @@ void DefaultSettings(byte userhardwaremodel) {
EEPROM.writeByte(EE_BYTE_BWSET_AM, 2); EEPROM.writeByte(EE_BYTE_BWSET_AM, 2);
EEPROM.writeByte(EE_BYTE_BANDAUTOSW, 0); EEPROM.writeByte(EE_BYTE_BANDAUTOSW, 0);
EEPROM.writeByte(EE_BYTE_FASTPS, 1); EEPROM.writeByte(EE_BYTE_FASTPS, 1);
EEPROM.writeByte(EE_BYTE_TOT, 60);
EEPROM.commit(); EEPROM.commit();
} }
@@ -3410,3 +3398,12 @@ void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int colo
tft.drawString(text, x, y, 1); tft.drawString(text, x, y, 1);
} }
void deepSleep() {
analogWrite(SMETERPIN, 0);
MuteScreen(1);
StoreFrequency();
radio.power(1);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, LOW);
esp_deep_sleep_start();
}
+5 -4
View File
@@ -106,7 +106,7 @@
// EEPROM index defines // EEPROM index defines
#define EE_PRESETS_CNT 99 #define EE_PRESETS_CNT 99
#define EE_CHECKBYTE_VALUE 35 // 0 ~ 255,add new entry, change for new value #define EE_CHECKBYTE_VALUE 36 // 0 ~ 255,add new entry, change for new value
#define EE_TOTAL_CNT 618 #define EE_TOTAL_CNT 618
#define EE_UINT16_FREQUENCY_FM 0 #define EE_UINT16_FREQUENCY_FM 0
@@ -181,8 +181,9 @@
#define EE_UINT16_FREQUENCY_OIRT 102 #define EE_UINT16_FREQUENCY_OIRT 102
#define EE_STRING_XDRGTK_KEY 106 // 11 byte #define EE_STRING_XDRGTK_KEY 106 // 11 byte
#define EE_BYTE_FASTPS 118 #define EE_BYTE_FASTPS 118
#define EE_PRESETS_BAND_START 119 #define EE_BYTE_TOT 119
#define EE_PRESETS_START 221 #define EE_PRESETS_BAND_START 120
#define EE_PRESETS_START 220
#define EE_PRESETS_FREQUENCY 8750 #define EE_PRESETS_FREQUENCY 8750
// End of EEPROM index defines // End of EEPROM index defines
@@ -212,7 +213,7 @@ enum RADIO_TUNE_MODE {
}; };
enum RADIO_POWER_MODE { enum RADIO_POWER_MODE {
DEEP_SLEEP = 0, LCD_OFF, LCD_BRIGHTNESS_1_PERCENT, LCD_BRIGHTNESS_A_QUARTER, LCD_BRIGHTNESS_HALF, RADIO_POWER_MODE_CNT LCD_OFF, LCD_BRIGHTNESS_1_PERCENT, LCD_BRIGHTNESS_A_QUARTER, LCD_BRIGHTNESS_HALF, RADIO_POWER_MODE_CNT
}; };
enum RADIO_HARDWARE_MODEL { enum RADIO_HARDWARE_MODEL {
+33 -8
View File
@@ -6,7 +6,7 @@
#include <EEPROM.h> #include <EEPROM.h>
byte menuitem; byte menuitem;
byte items[8] = {8, 2, 6, 9, 9, 10, 8, 5}; byte items[8] = {8, 2, 6, 10, 9, 10, 8, 5};
void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de/online/rgb565-color-picker/ void doTheme() { // Use this to put your own colors in: http://www.barth-dev.de/online/rgb565-color-picker/
switch (CurrentTheme) { switch (CurrentTheme) {
@@ -422,6 +422,7 @@ void BuildMenu() {
tftPrint(-1, myLanguage[language][74], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][74], 8, ITEM7 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][173], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][173], 8, ITEM8 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][98], 8, ITEM9 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(-1, myLanguage[language][98], 8, ITEM9 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(-1, myLanguage[language][75], 8, ITEM10 + 6, ActiveColor, ActiveColorSmooth, 16);
tftPrint(1, myLanguage[language][0], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, myLanguage[language][0], 310, ITEM1 + 6, PrimaryColor, PrimaryColorSmooth, 16);
tftPrint(1, "%", 310, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16); tftPrint(1, "%", 310, ITEM2 + 6, ActiveColor, ActiveColorSmooth, 16);
@@ -431,9 +432,9 @@ void BuildMenu() {
tftPrint(1, CurrentThemeString, 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, CurrentThemeString, 310, ITEM5 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (screensaverset) tftPrint(1, myLanguage[language][92], 310, ITEM6 + 6, ActiveColor, ActiveColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (screensaverset) tftPrint(1, myLanguage[language][92], 310, ITEM6 + 6, ActiveColor, ActiveColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (screensaverset) tftPrint(1, String(screensaverOptions[screensaverset], DEC), 270, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); if (screensaverset) tftPrint(1, String(screensaverOptions[screensaverset], DEC), 270, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM6 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, myLanguage[language][205], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16); else tftPrint(1, myLanguage[language][30], 310, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP: tftPrint(1, myLanguage[language][75], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
case LCD_OFF: tftPrint(1, myLanguage[language][76], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break; case LCD_OFF: tftPrint(1, myLanguage[language][76], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(1, myLanguage[language][94], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(1, myLanguage[language][94], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(1, myLanguage[language][95], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(1, myLanguage[language][95], 310, ITEM7 + 6, PrimaryColor, PrimaryColorSmooth, 16); break;
@@ -447,6 +448,7 @@ void BuildMenu() {
} }
tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16); tftPrint(1, unitString[unit], 310, ITEM9 + 6, PrimaryColor, PrimaryColorSmooth, 16);
if (tot != 0) tftPrint(1, String(tot), 270, ITEM10 + 6, PrimaryColor, PrimaryColorSmooth, 16);
break; break;
case RDSSETTINGS: case RDSSETTINGS:
@@ -981,7 +983,6 @@ void MenuUp() {
case ITEM7: case ITEM7:
switch (poweroptionsold) { switch (poweroptionsold) {
case DEEP_SLEEP: tftPrint(0, myLanguage[language][75], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, BackgroundColor, BackgroundColor, 28); break;
@@ -992,7 +993,6 @@ void MenuUp() {
if (poweroptions > RADIO_POWER_MODE_CNT - 1) poweroptions = 0; if (poweroptions > RADIO_POWER_MODE_CNT - 1) poweroptions = 0;
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP: tftPrint(0, myLanguage[language][75], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
@@ -1025,6 +1025,18 @@ void MenuUp() {
if (unit > 2) unit = 0; if (unit > 2) unit = 0;
tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
case ITEM10:
if (tot != 0) tftPrint(0, String(tot) + " " + myLanguage[language][205], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 0: tot = 15; break;
case 15: tot = 30; break;
case 30: tot = 60; break;
case 60: tot = 90; break;
default: tot = 0; break;
}
if (tot != 0) tftPrint(0, String(tot) + " " + myLanguage[language][205], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
} }
break; break;
@@ -1499,7 +1511,6 @@ void MenuDown() {
case ITEM7: case ITEM7:
switch (poweroptionsold) { switch (poweroptionsold) {
case DEEP_SLEEP: tftPrint(0, myLanguage[language][75], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, BackgroundColor, BackgroundColor, 28); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, BackgroundColor, BackgroundColor, 28); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, BackgroundColor, BackgroundColor, 28); break;
@@ -1510,7 +1521,6 @@ void MenuDown() {
if (poweroptions > RADIO_POWER_MODE_CNT - 1) poweroptions = RADIO_POWER_MODE_CNT - 1; if (poweroptions > RADIO_POWER_MODE_CNT - 1) poweroptions = RADIO_POWER_MODE_CNT - 1;
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP: tftPrint(0, myLanguage[language][75], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
@@ -1543,6 +1553,18 @@ void MenuDown() {
if (unit > 2) unit = 2; if (unit > 2) unit = 2;
tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28); tftPrint(0, String(unitString[unit]), 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
case ITEM10:
if (tot != 0) tftPrint(0, String(tot) + " " + myLanguage[language][205], 155, 118, BackgroundColor, BackgroundColor, 28); else tftPrint(0, myLanguage[language][30], 155, 118, BackgroundColor, BackgroundColor, 28);
switch (tot) {
case 15: tot = 0; break;
case 30: tot = 15; break;
case 60: tot = 30; break;
case 90: tot = 60; break;
default: tot = 90; break;
}
if (tot != 0) tftPrint(0, String(tot) + " " + myLanguage[language][205], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
} }
break; break;
@@ -2040,7 +2062,6 @@ void DoMenu() {
case ITEM7: case ITEM7:
tftPrint(0, myLanguage[language][74], 155, 78, ActiveColor, ActiveColorSmooth, 28); tftPrint(0, myLanguage[language][74], 155, 78, ActiveColor, ActiveColorSmooth, 28);
switch (poweroptions) { switch (poweroptions) {
case DEEP_SLEEP: tftPrint(0, myLanguage[language][75], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_OFF: tftPrint(0, myLanguage[language][76], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_1_PERCENT: tftPrint(0, myLanguage[language][94], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break; case LCD_BRIGHTNESS_A_QUARTER: tftPrint(0, myLanguage[language][95], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
@@ -2063,6 +2084,11 @@ void DoMenu() {
tftPrint(0, myLanguage[language][98], 155, 78, ActiveColor, ActiveColorSmooth, 28); tftPrint(0, myLanguage[language][98], 155, 78, ActiveColor, ActiveColorSmooth, 28);
tftPrint(0, unitString[unit], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); tftPrint(0, unitString[unit], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break; break;
case ITEM10:
tftPrint(0, myLanguage[language][75], 155, 78, ActiveColor, ActiveColorSmooth, 28);
if (tot != 0) tftPrint(0, String(tot) + " " + myLanguage[language][205], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); else tftPrint(0, myLanguage[language][30], 155, 118, PrimaryColor, PrimaryColorSmooth, 28);
break;
} }
break; break;
@@ -2076,7 +2102,6 @@ void DoMenu() {
case 2: tftPrint(0, myLanguage[language][201], 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; case 3: tftPrint(0, myLanguage[language][202], 155, 118, PrimaryColor, PrimaryColorSmooth, 28); break;
} }
break; break;
case ITEM2: case ITEM2:
+2 -1
View File
@@ -52,7 +52,6 @@ extern bool rdsreset;
extern bool RDSstatus; extern bool RDSstatus;
extern bool RDSstatusold; extern bool RDSstatusold;
extern bool rdsstereoold; extern bool rdsstereoold;
extern byte showrdserrors;
extern bool showsquelch; extern bool showsquelch;
extern bool softmuteam; extern bool softmuteam;
extern bool softmutefm; extern bool softmutefm;
@@ -99,6 +98,7 @@ extern byte screensaverOptions[5];
extern byte screensaverset; extern byte screensaverset;
extern byte showmodulation; extern byte showmodulation;
extern byte showSWMIBand; extern byte showSWMIBand;
extern byte showrdserrors;
extern byte stationlistid; extern byte stationlistid;
extern int8_t CNold; extern int8_t CNold;
extern byte StereoLevel; extern byte StereoLevel;
@@ -106,6 +106,7 @@ extern byte StereoLevel;
extern byte submenu; extern byte submenu;
extern byte subnetclient; extern byte subnetclient;
extern byte theme; extern byte theme;
extern byte tot;
extern byte touchrotating; extern byte touchrotating;
extern byte unit; extern byte unit;
extern char programTypePrevious[18]; extern char programTypePrevious[18];
+70 -415
View File
@@ -1,6 +1,6 @@
// [number of languages][number of texts] // [number of languages][number of texts]
static const char* const myLanguage[17][205] = { static const char* const myLanguage[17][206] = {
{ "English", // English { "English", // English
"Rotary direction changed", // 1 "Rotary direction changed", // 1
"Please release button", // 2 "Please release button", // 2
@@ -75,8 +75,8 @@ static const char* const myLanguage[17][205] = {
"Main code:", // 71 "Main code:", // 71
"Contributors:", // 72 "Contributors:", // 72
"Unknown", // 73 "Unknown", // 73
"Power options", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Screen off", // 76 "Screen off", // 76
"Theme", // 77 "Theme", // 77
"Default", // 78 "Default", // 78
@@ -205,7 +205,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Nederlands", // Dutch { "Nederlands", // Dutch
@@ -282,8 +283,8 @@ static const char* const myLanguage[17][205] = {
"Basis code:", // 71 "Basis code:", // 71
"Bijgedragen:", // 72 "Bijgedragen:", // 72
"Onbekend", // 73 "Onbekend", // 73
"Bespaar opties", // 74 "Screensaver opties", // 74
"Volledig uit", // 75 "Auto uitschakelen", // 75
"Scherm uit", // 76 "Scherm uit", // 76
"Thema", // 77 "Thema", // 77
"Default", // 78 "Default", // 78
@@ -412,7 +413,8 @@ static const char* const myLanguage[17][205] = {
"Middel", // 201 "Middel", // 201
"Alles", // 202 "Alles", // 202
"Snelle PS", // 203 "Snelle PS", // 203
"Gedetecteerde applicaties" // 204 "Gedetecteerde applicaties", // 204
"Min." // 205
}, },
{ "Polski", // Polish { "Polski", // Polish
@@ -489,8 +491,8 @@ static const char* const myLanguage[17][205] = {
"Glowny kod:", // 71 "Glowny kod:", // 71
"Wspoltworcy:", // 72 "Wspoltworcy:", // 72
"Nieznany", // 73 "Nieznany", // 73
"Opcje zasilania", // 74 "Screensaver options", // 74
"Glebokie uspienie", // 75 "Time-out timer", // 75
"Wylacz ekran", // 76 "Wylacz ekran", // 76
"Motyw", // 77 "Motyw", // 77
"Domyslny", // 78 "Domyslny", // 78
@@ -619,7 +621,8 @@ static const char* const myLanguage[17][205] = {
"Duze", // 201 "Duze", // 201
"Wszystkie", // 202 "Wszystkie", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Hrvatski", // Croatian { "Hrvatski", // Croatian
@@ -696,8 +699,8 @@ static const char* const myLanguage[17][205] = {
"Glavni izvorni kod:", // 71 "Glavni izvorni kod:", // 71
"Suradnici:", // 72 "Suradnici:", // 72
"Nepoznato", // 73 "Nepoznato", // 73
"Power options", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Zaslon isključiti", // 76 "Zaslon isključiti", // 76
"Tema dizajna", // 77 "Tema dizajna", // 77
"Zadano", // 78 "Zadano", // 78
@@ -826,7 +829,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Ελληνικά", // Greek { "Ελληνικά", // Greek
@@ -903,8 +907,8 @@ static const char* const myLanguage[17][205] = {
"Κύριος κώδικας:", // 71 "Κύριος κώδικας:", // 71
"Συνεργάτες:", // 72 "Συνεργάτες:", // 72
"Άγνωστο", // 73 "Άγνωστο", // 73
"Επιλογές ενέργειας", // 74 "Screensaver options", // 74
"Βαθιά αναμονή", // 75 "Time-out timer", // 75
"Οθόνη σβηστή", // 76 "Οθόνη σβηστή", // 76
"Θέμα", // 77 "Θέμα", // 77
"Προεπιλογή", // 78 "Προεπιλογή", // 78
@@ -1033,7 +1037,8 @@ static const char* const myLanguage[17][205] = {
"Μεγάλο", // 201 "Μεγάλο", // 201
"Όλα", // 202 "Όλα", // 202
"Γρήγορο PS", // 203 "Γρήγορο PS", // 203
"Εντοπισμένες εφαρμογές" // 204 "Εντοπισμένες εφαρμογές", // 204
"Min." // 205
}, },
{ "Romana", // Romanian { "Romana", // Romanian
@@ -1110,8 +1115,8 @@ static const char* const myLanguage[17][205] = {
"Main code:", // 71 "Main code:", // 71
"Contributors:", // 72 "Contributors:", // 72
"Unknown", // 73 "Unknown", // 73
"Power options", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Screen off", // 76 "Screen off", // 76
"Theme", // 77 "Theme", // 77
"Default", // 78 "Default", // 78
@@ -1240,7 +1245,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Deutsch", // German { "Deutsch", // German
@@ -1317,8 +1323,8 @@ static const char* const myLanguage[17][205] = {
"Hauptcode:", // 71 "Hauptcode:", // 71
"Mitwirkende:", // 72 "Mitwirkende:", // 72
"Unbekannt", // 73 "Unbekannt", // 73
"Energieeinstellungen", // 74 "Screensaver options", // 74
"Komplett aus", // 75 "Time-out timer", // 75
"Bildschirm aus", // 76 "Bildschirm aus", // 76
"Thema", // 77 "Thema", // 77
"Standard", // 78 "Standard", // 78
@@ -1447,7 +1453,8 @@ static const char* const myLanguage[17][205] = {
"Groß", // 201 "Groß", // 201
"Alles", // 202 "Alles", // 202
"Schnelles PS", // 203 "Schnelles PS", // 203
"Erkenne Applikationen" // 204 "Erkenne Applikationen", // 204
"Min." // 205
}, },
{ "Czech", // Czech { "Czech", // Czech
@@ -1524,8 +1531,8 @@ static const char* const myLanguage[17][205] = {
"Main code:", // 71 "Main code:", // 71
"Contributors:", // 72 "Contributors:", // 72
"Unknown", // 73 "Unknown", // 73
"Power options", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Screen off", // 76 "Screen off", // 76
"Theme", // 77 "Theme", // 77
"Default", // 78 "Default", // 78
@@ -1654,7 +1661,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Slovak", // Slovak { "Slovak", // Slovak
@@ -1731,8 +1739,8 @@ static const char* const myLanguage[17][205] = {
"Main code:", // 71 "Main code:", // 71
"Contributors:", // 72 "Contributors:", // 72
"Unknown", // 73 "Unknown", // 73
"Power options", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Screen off", // 76 "Screen off", // 76
"Theme", // 77 "Theme", // 77
"Default", // 78 "Default", // 78
@@ -1861,7 +1869,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Français", // French { "Français", // French
@@ -1938,8 +1947,8 @@ static const char* const myLanguage[17][205] = {
"Code principal :", // 71 "Code principal :", // 71
"Contributeurs :", // 72 "Contributeurs :", // 72
"Inconnu", // 73 "Inconnu", // 73
"Options d'énergie", // 74 "Screensaver options", // 74
"Veille profonde", // 75 "Time-out timer", // 75
"Affichage éteint", // 76 "Affichage éteint", // 76
"Thème", // 77 "Thème", // 77
"Défaut", // 78 "Défaut", // 78
@@ -2068,7 +2077,8 @@ static const char* const myLanguage[17][205] = {
"Grosses", // 201 "Grosses", // 201
"Toutes", // 202 "Toutes", // 202
"PS rapide", // 203 "PS rapide", // 203
"Applications détectées" // 204 "Applications détectées", // 204
"Min." // 205
}, },
{ "Български", // Bulgarian { "Български", // Bulgarian
@@ -2145,8 +2155,8 @@ static const char* const myLanguage[17][205] = {
"Главен код:", // 71 "Главен код:", // 71
"Сътрудници:", // 72 "Сътрудници:", // 72
"Неизвестно", // 73 "Неизвестно", // 73
"Опции при заспиване", // 74 "Screensaver options", // 74
"Режим дълбок сън", // 75 "Time-out timer", // 75
"Изключен дисплей", // 76 "Изключен дисплей", // 76
"Тема", // 77 "Тема", // 77
"По подразбиране", // 78 "По подразбиране", // 78
@@ -2275,7 +2285,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Русский", // Russian { "Русский", // Russian
@@ -2352,8 +2363,8 @@ static const char* const myLanguage[17][205] = {
"Основной код:", // 71 "Основной код:", // 71
"Соавторы:", // 72 "Соавторы:", // 72
"Неизвестно", // 73 "Неизвестно", // 73
"Параметры питания", // 74 "Screensaver options", // 74
"Глубокий сон", // 75 "Time-out timer", // 75
"Экран выключен", // 76 "Экран выключен", // 76
"Тема", // 77 "Тема", // 77
"По умолчанию", // 78 "По умолчанию", // 78
@@ -2482,7 +2493,8 @@ static const char* const myLanguage[17][205] = {
"Много", // 201 "Много", // 201
"Все", // 202 "Все", // 202
"Быстрый PS", // 203 "Быстрый PS", // 203
"Обнаруженные приложения" // 204 "Обнаруженные приложения", // 204
"Min." // 205
}, },
{ "Українська", // Ukranian { "Українська", // Ukranian
@@ -2559,8 +2571,8 @@ static const char* const myLanguage[17][205] = {
"Основний код:", // 71 "Основний код:", // 71
"Учасники:", // 72 "Учасники:", // 72
"Невідомо", // 73 "Невідомо", // 73
"Опції живлення", // 74 "Screensaver options", // 74
"Глибокий сон", // 75 "Time-out timer", // 75
"Екран вимкнено", // 76 "Екран вимкнено", // 76
"Тема", // 77 "Тема", // 77
"За замовчуванням", // 78 "За замовчуванням", // 78
@@ -2689,7 +2701,8 @@ static const char* const myLanguage[17][205] = {
"Багато", // 201 "Багато", // 201
"Усе", // 202 "Усе", // 202
"Швидкий PS", // 203 "Швидкий PS", // 203
"Виявлені програми" // 204 "Виявлені програми", // 204
"Min." // 205
}, },
{ "Italiano", // Italian { "Italiano", // Italian
@@ -2766,8 +2779,8 @@ static const char* const myLanguage[17][205] = {
"Codice principale:", // 71 "Codice principale:", // 71
"Collaboratori: ", // 72 "Collaboratori: ", // 72
"Sconosciuto", // 73 "Sconosciuto", // 73
"Opzioni risparmio energia", // 74 "Screensaver options", // 74
"Deep sleep", // 75 "Time-out timer", // 75
"Schermo spento", // 76 "Schermo spento", // 76
"Motivo display", // 77 "Motivo display", // 77
"Predefinito", // 78 "Predefinito", // 78
@@ -2896,7 +2909,8 @@ static const char* const myLanguage[17][205] = {
"Large", // 201 "Large", // 201
"All", // 202 "All", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Simplified Chinese", // Simplified Chinese { "Simplified Chinese", // Simplified Chinese
@@ -2973,8 +2987,8 @@ static const char* const myLanguage[17][205] = {
"主程序:", // 71 "主程序:", // 71
"贡献者:", // 72 "贡献者:", // 72
"未知", // 73 "未知", // 73
"电源选项", // 74 "Screensaver options", // 74
"深度睡眠", // 75 "Time-out timer", // 75
"关闭屏幕", // 76 "关闭屏幕", // 76
"主题&颜色", // 77 "主题&颜色", // 77
"默认", // 78 "默认", // 78
@@ -3103,7 +3117,8 @@ static const char* const myLanguage[17][205] = {
"大量", // 201 "大量", // 201
"全部", // 202 "全部", // 202
"Fast PS", // 203 "Fast PS", // 203
"Detected applications" // 204 "Detected applications", // 204
"Min." // 205
}, },
{ "Norsk", // Norwegian { "Norsk", // Norwegian
@@ -3180,8 +3195,8 @@ static const char* const myLanguage[17][205] = {
"Hovedkode:", // 71 "Hovedkode:", // 71
"Bidragsytere:", // 72 "Bidragsytere:", // 72
"Ukjent", // 73 "Ukjent", // 73
"Strømalternativer", // 74 "Screensaver options", // 74
"Dyp søvn", // 75 "Time-out timer", // 75
"Skjerm av", // 76 "Skjerm av", // 76
"Tema", // 77 "Tema", // 77
"Standard", // 78 "Standard", // 78
@@ -3310,7 +3325,8 @@ static const char* const myLanguage[17][205] = {
"Mye", // 201 "Mye", // 201
"Alt", // 202 "Alt", // 202
"Rask PS", // 203 "Rask PS", // 203
"Oppdaget applikasjoner" // 204 "Oppdaget applikasjoner", // 204
"Min." // 205
}, },
{ "Español", // Spanish { "Español", // Spanish
@@ -3387,8 +3403,8 @@ static const char* const myLanguage[17][205] = {
"Código principal:", // 71 "Código principal:", // 71
"Colaboradores:", // 72 "Colaboradores:", // 72
"Desconocido", // 73 "Desconocido", // 73
"Opciones de energía", // 74 "Screensaver options", // 74
"Suspensión profunda", // 75 "Time-out timer", // 75
"Apagar pantalla", // 76 "Apagar pantalla", // 76
"Tema", // 77 "Tema", // 77
"Predeterminado", // 78 "Predeterminado", // 78
@@ -3517,368 +3533,7 @@ static const char* const myLanguage[17][205] = {
"Grande", // 201 "Grande", // 201
"Todo", // 202 "Todo", // 202
"PS rápido", // 203 "PS rápido", // 203
"Aplicaciones detectadas" // 204 "Aplicaciones detectadas", // 204
"Min." // 205
} }
}; };
static const char* const myCountries[] {
"Germany", // 0
"Greece", // 1
"Morocco", // 2
"Moldova", // 3
"Algeria", // 4
"Cyprus", // 5
"Czech R.", // 6
"Ireland", // 7
"Estonia", // 8
"Andorra", // 9
"San Marino", // 10
"Poland", // 11
"Turkey", // 12
"Israel", // 13
"Switzerl.", // 14
"Vatican", // 15
"Macedonia", // 16
"Italy", // 17
"Jordan", // 18
"Slovakia", // 19
"Belgium", // 20
"Finland", // 21
"Syria", // 22
"Serbia", // 23
"Ukraine", // 24
"Russia", // 25
"Luxemb.", // 26
"Tunisia", // 27
"Palestine", // 28
"Bulgaria", // 29
"Madeira", // 30
"Netherl.", // 31
"Portugal", // 32
"Albania", // 33
"Denmark", // 34
"Liechtst.", // 35
"Latvia", // 36
"Slovenia", // 37
"Austria", // 38
"Gibraltar", // 39
"Iceland", // 40
"Lebanon", // 41
"Hungary", // 42
"Iraq", // 43
"Monaco", // 44
"Malta", // 45
"U.K.", // 46
"Lithuania", // 47
"Croatia", // 48
"Libya", // 49
"Canaries", // 50
"Romania", // 51
"Spain", // 52
"Sweden", // 53
"Egypt", // 54
"France", // 55
"Norway", // 56
"Belarus", // 57
"Bosnia H.", // 58
"Monteneg.", // 59
"Armenia", // 60
"Azerbaijan", // 61
"Kosovo", // 62
"Kyrgystan", // 63
"Turkmenis.", // 64
"Tajikistan", // 65
"Uzbekistan", // 66
"Malawi", // 67
"Mali", // 68
"Mauritania", // 69
"Mauritius", // 70
"Mongolia", // 71
"Mozambiq.", // 72
"Namibia", // 73
"Niger", // 74
"Nigeria", // 75
"Oman", // 76
"Qatar", // 77
"Rwanda", // 78
"Sao Tome", // 79
"Saudi Ara.", // 80
"Senegal", // 81
"Seychel.", // 82
"S. Leone", // 83
"Somalia", // 84
"S. Africa", // 85
"S. Sudan", // 86
"Sudan", // 87
"Swaziland", // 88
"Tanzania", // 89
"Togo", // 90
"Uganda", // 91
"W. Sahara", // 92
"Yemen", // 93
"Zambia", // 94
"Zimbabwe", // 95
"Angola", // 96
"Ascn. Isl.", // 97
"Bahrein", // 98
"Benin", // 99
"Botswana", // 100
"Burkina F.", // 101
"Burundi", // 102
"Cabinda", // 103
"Cameroon", // 104
"Cape Ver.", // 105
"Centr. Af.", // 106
"Chad", // 107
"Comoros", // 108
"D. Congo", // 109
"Congo", // 110
"Cote d'l.", // 111
"Djibouti", // 112
"E. Guinea", // 113
"Eritrea", // 114
"Ethiopia", // 115
"Gabon", // 116
"Gambia", // 117
"Georgia", // 118
"Ghana", // 119
"Guinea", // 120
"Guinea-B.", // 121
"Kazakh.", // 122
"Kenya", // 123
"Kuwait", // 124
"Lesotho", // 125
"Liberia", // 126
"Madagas.", // 127
"U.Arab.E.", // 128
"Anguilla", // 129
"Antigua.", // 130
"Argentina", // 131
"Aruba", // 132
"Barbados", // 133
"Belize", // 134
"Bermuda", // 135
"Bolivia", // 136
"Brazil", // 137
"Canada", // 138
"Cayman I.", // 139
"Chile", // 140
"Colombia", // 141
"Costa R.", // 142
"Cuba", // 143
"Dominica", // 144
"Domini. R", // 145
"El Salvad.", // 146
"Equador", // 147
"Falkland", // 148
"Greenland", // 149
"Grenada", // 150
"Guadeloupe", // 151
"Guatemala", // 152
"Guyana", // 153
"Haiti", // 154
"Honduras", // 155
"Jamaica", // 156
"Martinique", // 157
"Mexico", // 158
"Montserrat", // 159
"Nether. A.", // 160
"Nicaragua", // 161
"Panama", // 162
"Paraguay", // 163
"Peru", // 164
"Puerto R.", // 165
"St. Kitts", // 166
"St. Lucia", // 167
"St. P.& M.", // 168
"St.Vincent", // 169
"Suriname", // 170
"T & T", // 171
"Turks & C.", // 172
"U.S.A.", // 173
"Uruguay", // 174
"Venezuela", // 175
"Virgin UK", // 176
"Virgin USA", // 177
"Afganist.", // 178
"AU C.T.", // 179
"AU N.S.W.", // 180
"AU Vict.", // 181
"AU Queen", // 182
"AU S. Au.", // 183
"AU W. Au.", // 184
"AU Tasma.", // 185
"AU N. T.", // 186
"Bhutan", // 187
"Brunei D.", // 188
"Cambodia", // 189
"China", // 190
"Fiji", // 191
"Hong Kong", // 192
"India", // 193
"Indonesia", // 194
"Iran", // 195
"Japan", // 196
"Kiribati", // 197
"N. Korea", // 198
"S. Korea", // 199
"Laos", // 200
"Macao", // 201
"Malaysia", // 202
"Maldives", // 203
"Marshall I", // 204
"Micronesia", // 205
"Myanmar", // 206
"Nauru", // 207
"Nepal", // 208
"N.Zealand", // 209
"Pakistan", // 210
"Papua N.G", // 211
"Philippin.", // 212
"Samoa", // 213
"Singapore", // 214
"Solomon I.", // 215
"Sri Lanka", // 216
"Taiwan", // 217
"Thailand", // 218
"Tonga", // 219
"Vanuatu", // 220
"Vietnam", // 221
"Bahamas", // 222
"BM or BR", // 223
"EC or BR", // 224
"AN or BR", // 225
"USA/VI/ PR", // 226
"Bangladesh" // 227
};
static const char* const myLanguages[] = {
"Unknown", // 0
"Albanian", // 1
"Breton", // 2
"Catalan", // 3
"Croatian", // 4
"Welsh", // 5
"Czech", // 6
"Danish", // 7
"German", // 8
"English", // 9
"Spanish", // 10
"Esperanto", // 11
"Estonian", // 12
"Basque", // 13
"Faroese", // 14
"French", // 15
"Frisian", // 16
"Irish", // 17
"Gaelic", // 18
"Galician", // 19
"Icelandic", // 20
"Italian", // 21
"Lappish", // 22
"Latin", // 23
"Latvian", // 24
"Luxemb.", // 25
"Lithua.", // 26
"Hungar.", // 27
"Maltese", // 28
"Dutch", // 29
"Norweg.", // 30
"Occitan", // 31
"Polish", // 32
"Portug.", // 33
"Romanian", // 34
"Romansh", // 35
"Serbian", // 36
"Slovak", // 37
"Slovene", // 38
"Finnish", // 39
"Swedish", // 40
"Turkish", // 41
"Flemish", // 42
"Walloon", // 43
"", // 44
"", // 45
"", // 46
"", // 47
"", // 48
"", // 49
"", // 50
"", // 51
"", // 52
"", // 53
"", // 54
"", // 55
"", // 56
"", // 57
"", // 58
"", // 59
"", // 60
"", // 61
"", // 62
"", // 63
"Backgr.", // 64
"", // 65
"", // 66
"", // 67
"", // 68
"Zulu", // 69
"Vietnam.", // 70
"Uzbek", // 71
"Urdu", // 72
"Ukrain.", // 73
"Thai", // 74
"Telugu", // 75
"Tatar", // 76
"Tamil", // 77
"Tadzhik", // 78
"Swahili", // 79
"SrananT.", // 80
"Somali", // 81
"Sinhalese", // 82
"Shona", // 83
"Serbo-C.", // 84
"Ruthen.", // 85
"Russian", // 86
"Quechua", // 87
"Pushtu", // 88
"Punjabi", // 89
"Persian", // 90
"Papami.", // 91
"Oriya", // 92
"Nepali", // 93
"Ndebele", // 94
"Marathi", // 95
"Moldov.", // 96
"Malays.", // 97
"Malagas.", // 98
"Macedon.", // 99
"Laotian", // 100
"Korean", // 101
"Khmer", // 102
"Kazakh", // 103
"Kannada", // 104
"Japanese", // 105
"Indones.", // 106
"Hindi", // 107
"Hebrew", // 108
"Hausa", // 109
"Gurani", // 110
"Gujurati", // 111
"Greek", // 112
"Georgian", // 113
"Fulani", // 114
"Dari", // 115
"Churash", // 116
"Chinese", // 117
"Burmese", // 118
"Bulgarian", // 119
"Bengali", // 120
"Belorus.", // 121
"Bambora", // 122
"Azerbaij.", // 123
"Assamese", // 124
"Armenian", // 125
"Arabic", // 126
"Amharic" // 127
};