You've already forked TEF6686_ESP32
Updates in memory channels
- Skipped channels will be skipped in memory tuning mode - You can now set a memory channel to skip bij entering edit mode and pressing the band button
This commit is contained in:
@@ -1342,51 +1342,63 @@ void ToggleBand(byte nowBand) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BANDBUTTONPress() {
|
void BANDBUTTONPress() {
|
||||||
if (!usesquelch) radio.setUnMute();
|
if (memorystore) {
|
||||||
if (afscreen) {
|
EEPROM.writeUInt((memorypos * 4) + EE_PRESETS_START, EE_PRESETS_FREQUENCY);
|
||||||
BuildAdvancedRDS();
|
EEPROM.commit();
|
||||||
|
memory[memorypos] = EE_PRESETS_FREQUENCY;
|
||||||
|
memorystore = false;
|
||||||
|
ShowTuneMode();
|
||||||
|
if (memoryposstatus == MEM_DARK || memoryposstatus == MEM_EXIST) {
|
||||||
|
memoryposstatus = MEM_NORMAL;
|
||||||
|
ShowMemoryPos();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned long counterold = millis();
|
if (!usesquelch) radio.setUnMute();
|
||||||
unsigned long counter = millis();
|
if (afscreen) {
|
||||||
if (!menu) {
|
BuildAdvancedRDS();
|
||||||
while (digitalRead(BANDBUTTON) == LOW && counter - counterold <= 1000) counter = millis();
|
} else {
|
||||||
|
unsigned long counterold = millis();
|
||||||
|
unsigned long counter = millis();
|
||||||
|
if (!menu) {
|
||||||
|
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) {
|
|
||||||
BuildDisplay();
|
|
||||||
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 {
|
|
||||||
if (screensavertriggered) {
|
|
||||||
WakeToSleep(REVERSE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (band < BAND_GAP) {
|
if (advancedRDS) {
|
||||||
if (advancedRDS && !seek) BuildAFScreen(); else BuildAdvancedRDS();
|
BuildDisplay();
|
||||||
|
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 {
|
||||||
WakeToSleep(true);
|
if (screensavertriggered) {
|
||||||
|
WakeToSleep(REVERSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (band < BAND_GAP) {
|
||||||
|
if (advancedRDS && !seek) BuildAFScreen(); else BuildAdvancedRDS();
|
||||||
|
} else {
|
||||||
|
WakeToSleep(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
|
||||||
delay(100);
|
|
||||||
}
|
}
|
||||||
|
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
||||||
|
delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreFrequency() {
|
void StoreFrequency() {
|
||||||
@@ -2357,6 +2369,15 @@ void KeyUp() {
|
|||||||
case TUNE_MEM:
|
case TUNE_MEM:
|
||||||
memorypos++;
|
memorypos++;
|
||||||
if (memorypos > EE_PRESETS_CNT - 1) memorypos = 0;
|
if (memorypos > EE_PRESETS_CNT - 1) memorypos = 0;
|
||||||
|
if (!memorystore) {
|
||||||
|
while (IsStationEmpty()) {
|
||||||
|
memorypos++;
|
||||||
|
if (memorypos > EE_PRESETS_CNT - 1) {
|
||||||
|
memorypos = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!memorystore) {
|
if (!memorystore) {
|
||||||
DoMemoryPosTune();
|
DoMemoryPosTune();
|
||||||
} else {
|
} else {
|
||||||
@@ -2409,6 +2430,15 @@ void KeyDown() {
|
|||||||
case TUNE_MEM:
|
case TUNE_MEM:
|
||||||
memorypos--;
|
memorypos--;
|
||||||
if (memorypos > EE_PRESETS_CNT - 1) memorypos = EE_PRESETS_CNT - 1;
|
if (memorypos > EE_PRESETS_CNT - 1) memorypos = EE_PRESETS_CNT - 1;
|
||||||
|
if (!memorystore) {
|
||||||
|
while (IsStationEmpty()) {
|
||||||
|
memorypos--;
|
||||||
|
if (memorypos > EE_PRESETS_CNT - 1) {
|
||||||
|
memorypos = EE_PRESETS_CNT - 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!memorystore) {
|
if (!memorystore) {
|
||||||
DoMemoryPosTune();
|
DoMemoryPosTune();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user