Squelch value bug while searching fixed

Changed start frequency OIRT
This commit is contained in:
Sjef Verhoeven PE5PVB
2023-07-27 23:47:39 +02:00
parent 38a9f86630
commit b7f8d1263f
2 changed files with 11 additions and 11 deletions
+10 -10
View File
@@ -3989,8 +3989,8 @@ void BuildAFScreen() {
tft.drawLine(268, 30, 268, 0, FrameColor); tft.drawLine(268, 30, 268, 0, FrameColor);
tftPrint(-1, "kHz", 222, 4, ActiveColor, ActiveColorSmooth, FONT28); tftPrint(-1, "kHz", 222, 4, ActiveColor, ActiveColorSmooth, FONT28);
tftPrint(0, myLanguage[language][93], 160, 222, ActiveColor, ActiveColorSmooth, FONT16); tftPrint(0, myLanguage[language][93], 160, 222, ActiveColor, ActiveColorSmooth, FONT16);
tftPrint(-1, myLanguage[language][88], 184, 54, PrimaryColor, PrimaryColorSmooth, FONT16); tftPrint(-1, myLanguage[language][88], 184, 48, PrimaryColor, PrimaryColorSmooth, FONT16);
tftPrint(-1, myLanguage[language][87], 6, 54, PrimaryColor, PrimaryColorSmooth, FONT16); tftPrint(-1, myLanguage[language][87], 6, 48, PrimaryColor, PrimaryColorSmooth, FONT16);
for (byte i = 0; i < 20; i++) mappedfreqold[i] = 0; for (byte i = 0; i < 20; i++) mappedfreqold[i] = 0;
RDSstatusold = false; RDSstatusold = false;
@@ -4580,7 +4580,7 @@ void ShowModLevel() {
if (showmodulation) { if (showmodulation) {
int segments; int segments;
if (SQ != false) { if (seek || SQ) {
MStatus = 0; MStatus = 0;
MStatusold = 1; MStatusold = 1;
} }
@@ -4611,7 +4611,7 @@ void doSquelch() {
Squelch = analogRead(PIN_POT) / 4 - 100; Squelch = analogRead(PIN_POT) / 4 - 100;
if (Squelch > 920) Squelch = 920; if (Squelch > 920) Squelch = 920;
if (showsquelch && !advancedRDS && !afscreen) { if (showsquelch && !advancedRDS && !afscreen) {
if (seek == false && menu == false && Squelch != Squelchold) { if (menu == false && Squelch != Squelchold) {
if (Squelchold == -100) { if (Squelchold == -100) {
if (Squelch != Squelchold) tftPrint(-1, myLanguage[language][33], 212, 163, BackgroundColor, BackgroundColor, FONT16); if (Squelch != Squelchold) tftPrint(-1, myLanguage[language][33], 212, 163, BackgroundColor, BackgroundColor, FONT16);
} else if (Squelchold == 920) { } else if (Squelchold == 920) {
@@ -4630,11 +4630,11 @@ void doSquelch() {
Squelchold = Squelch; Squelchold = Squelch;
} }
} }
if (seek == false && (XDRGTKUSB == true || XDRGTKTCP == true)) { if ((XDRGTKUSB == true || XDRGTKTCP == true)) {
if (XDRMute == false) { if (XDRMute == false) {
if (Squelch != -1) { if (Squelch != -1) {
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
radio.setUnMute(); if (!seek) radio.setUnMute();
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor); if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
SQ = false; SQ = false;
} else { } else {
@@ -4674,9 +4674,9 @@ void doSquelch() {
} }
} }
} else { } else {
if (seek == false && Squelch != 920) { if (Squelch != 920) {
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) { if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
radio.setUnMute(); if (!seek) radio.setUnMute();
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor); if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
SQ = false; SQ = false;
} else { } else {
@@ -4685,8 +4685,8 @@ void doSquelch() {
SQ = true; SQ = true;
} }
} else { } else {
if (seek == false && Stereostatus == true) { if (Stereostatus == true) {
radio.setUnMute(); if (!seek) radio.setUnMute();
if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor); if (screenmute == false) tft.drawBitmap(110, 5, Speaker, 26, 22, GreyoutColor);
SQ = false; SQ = false;
} else { } else {
+1 -1
View File
@@ -41,7 +41,7 @@
#define FREQ_SW_HIGH_EDGE_MAX (FREQ_SW_END) #define FREQ_SW_HIGH_EDGE_MAX (FREQ_SW_END)
#define FREQ_FM_START 65000 #define FREQ_FM_START 65000
#define FREQ_FM_END 108000 #define FREQ_FM_END 108000
#define FREQ_FM_OIRT_START 6402 // use values of 1/10 * kHz #define FREQ_FM_OIRT_START 6401 // use values of 1/10 * kHz
#define FREQ_FM_OIRT_END 7400 // use values of 1/10 * kHz #define FREQ_FM_OIRT_END 7400 // use values of 1/10 * kHz
// according to https://www.short-wave.info/index.php?feature=frequencies // according to https://www.short-wave.info/index.php?feature=frequencies