Bugfix in OIRT tuning via Stationlist
This commit is contained in:
+11
-6
@@ -19,20 +19,25 @@ void Communication() {
|
|||||||
String stlfreq = packet.substring(symPos + 5, packetSize);
|
String stlfreq = packet.substring(symPos + 5, packetSize);
|
||||||
if (afscreen) BuildAdvancedRDS();
|
if (afscreen) BuildAdvancedRDS();
|
||||||
if ((stlfreq.toInt()) / 10000 > 6500 && (stlfreq.toInt()) / 10000 < 10800) {
|
if ((stlfreq.toInt()) / 10000 > 6500 && (stlfreq.toInt()) / 10000 < 10800) {
|
||||||
frequency = (stlfreq.toInt()) / 10000;
|
unsigned int tempfreq = (stlfreq.toInt()) / 10000;
|
||||||
if (frequency >= FREQ_FM_OIRT_START && frequency <= FREQ_FM_OIRT_END && band != BAND_OIRT) {
|
if (tempfreq >= FREQ_FM_OIRT_START && tempfreq <= FREQ_FM_OIRT_END) {
|
||||||
band = BAND_OIRT;
|
if (band != BAND_OIRT) {
|
||||||
SelectBand();
|
band = BAND_OIRT;
|
||||||
|
frequency_OIRT = tempfreq;
|
||||||
|
BuildDisplay();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (band != BAND_FM) {
|
if (band != BAND_FM) {
|
||||||
band = BAND_FM;
|
band = BAND_FM;
|
||||||
SelectBand();
|
frequency = tempfreq;
|
||||||
|
BuildDisplay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (band == BAND_OIRT) {
|
if (band == BAND_OIRT) {
|
||||||
frequency_OIRT = frequency;
|
frequency_OIRT = tempfreq;
|
||||||
radio.SetFreq(frequency_OIRT);
|
radio.SetFreq(frequency_OIRT);
|
||||||
} else {
|
} else {
|
||||||
|
frequency = tempfreq;
|
||||||
radio.SetFreq(frequency);
|
radio.SetFreq(frequency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user