Fix on StationList LW/MW/SW tuning
This commit is contained in:
+20
-8
@@ -50,22 +50,34 @@ void Communication() {
|
|||||||
ScreensaverTimerReopen();
|
ScreensaverTimerReopen();
|
||||||
}
|
}
|
||||||
unsigned int tempfreq = (stlfreq.toInt()) / 1000;
|
unsigned int tempfreq = (stlfreq.toInt()) / 1000;
|
||||||
if (tempfreq >= FREQ_LW_LOW_EDGE_MIN && tempfreq <= FREQ_LW_HIGH_EDGE_MAX && band != BAND_LW) {
|
if (tempfreq >= FREQ_LW_LOW_EDGE_MIN && tempfreq <= FREQ_LW_HIGH_EDGE_MAX) {
|
||||||
band = BAND_LW;
|
|
||||||
frequency_LW = tempfreq;
|
frequency_LW = tempfreq;
|
||||||
SelectBand();
|
if (band != BAND_LW) {
|
||||||
} else if (tempfreq >= FREQ_MW_LOW_EDGE_MIN_9K && tempfreq <= FREQ_MW_HIGH_EDGE_MAX_9K && band != BAND_MW) {
|
band = BAND_LW;
|
||||||
band = BAND_MW;
|
|
||||||
frequency_MW = tempfreq;
|
|
||||||
SelectBand();
|
SelectBand();
|
||||||
} else {
|
} else {
|
||||||
if (band != BAND_SW) {
|
radio.SetFreqAM(frequency_LW);
|
||||||
|
frequency_AM = frequency_LW;
|
||||||
|
}
|
||||||
|
} else if (tempfreq >= FREQ_MW_LOW_EDGE_MIN_9K && tempfreq <= FREQ_MW_HIGH_EDGE_MAX_9K) {
|
||||||
|
frequency_MW = tempfreq;
|
||||||
|
if (band != BAND_MW) {
|
||||||
|
band = BAND_MW;
|
||||||
|
SelectBand();
|
||||||
|
} else {
|
||||||
|
radio.SetFreqAM(frequency_MW);
|
||||||
|
frequency_AM = frequency_MW;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
frequency_SW = tempfreq;
|
frequency_SW = tempfreq;
|
||||||
|
if (band != BAND_SW) {
|
||||||
band = BAND_SW;
|
band = BAND_SW;
|
||||||
SelectBand();
|
SelectBand();
|
||||||
|
} else {
|
||||||
|
radio.SetFreqAM(frequency_SW);
|
||||||
|
frequency_AM = frequency_SW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
radio.SetFreqAM(frequency_AM);
|
|
||||||
}
|
}
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
ShowFreq(0);
|
ShowFreq(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user