Squelch switch off function for XDRGTK
This commit is contained in:
+21
-11
@@ -751,6 +751,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GetData() {
|
void GetData() {
|
||||||
|
if (band == BAND_FM) ShowStereoStatus();
|
||||||
if (screenmute == false) {
|
if (screenmute == false) {
|
||||||
if (band == BAND_FM) {
|
if (band == BAND_FM) {
|
||||||
if (advancedRDS && !afscreen) ShowAdvancedRDS();
|
if (advancedRDS && !afscreen) ShowAdvancedRDS();
|
||||||
@@ -764,7 +765,6 @@ void GetData() {
|
|||||||
showECC();
|
showECC();
|
||||||
showRadioText();
|
showRadioText();
|
||||||
}
|
}
|
||||||
ShowStereoStatus();
|
|
||||||
}
|
}
|
||||||
ShowRSSI();
|
ShowRSSI();
|
||||||
ShowBattery();
|
ShowBattery();
|
||||||
@@ -3484,6 +3484,8 @@ void MuteScreen(int setting) {
|
|||||||
if (setting == 0 && screenmute == 1) {
|
if (setting == 0 && screenmute == 1) {
|
||||||
screenmute = false;
|
screenmute = false;
|
||||||
setupmode = true;
|
setupmode = true;
|
||||||
|
tft.writecommand(0x11);
|
||||||
|
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
BuildDisplay();
|
BuildDisplay();
|
||||||
setupmode = false;
|
setupmode = false;
|
||||||
@@ -3491,12 +3493,8 @@ void MuteScreen(int setting) {
|
|||||||
|
|
||||||
if (setting == 1 && screenmute == 0) {
|
if (setting == 1 && screenmute == 0) {
|
||||||
screenmute = true;
|
screenmute = true;
|
||||||
tft.setFreeFont(FONT14);
|
analogWrite(CONTRASTPIN, 0);
|
||||||
tft.fillScreen(BackgroundColor);
|
tft.writecommand(0x10);
|
||||||
tft.drawRect(0, 0, 320, 240, FrameColor);
|
|
||||||
tft.setTextColor(ActiveColor);
|
|
||||||
tft.drawCentreString(myLanguage[language][31], 160, 30, GFXFF);
|
|
||||||
tft.drawCentreString(myLanguage[language][32], 160, 90, GFXFF);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4318,7 +4316,7 @@ void doSquelch() {
|
|||||||
if (seek == false && (XDRGTKUSB == true || XDRGTKTCP == true)) {
|
if (seek == false && (XDRGTKUSB == true || XDRGTKTCP == true)) {
|
||||||
if (XDRMute == false) {
|
if (XDRMute == false) {
|
||||||
if (Squelch != -1) {
|
if (Squelch != -1) {
|
||||||
if (Squelch < SStatus || Squelch == -100) {
|
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -4337,16 +4335,28 @@ void doSquelch() {
|
|||||||
if (screenmute == false && showsquelch == true && !advancedRDS && !afscreen) {
|
if (screenmute == false && showsquelch == true && !advancedRDS && !afscreen) {
|
||||||
if (Squelch != Squelchold) {
|
if (Squelch != Squelchold) {
|
||||||
tft.setTextColor(BackgroundColor);
|
tft.setTextColor(BackgroundColor);
|
||||||
if (Squelchold == -1) tft.drawCentreString("ST", 224, 164, GFXFF); else tft.drawCentreString(String(Squelchold / 10), 224, 164, GFXFF);
|
if (Squelchold == -1) {
|
||||||
|
tft.drawCentreString("ST", 224, 164, GFXFF);
|
||||||
|
} else if (Squelchold == 0) {
|
||||||
|
tft.drawCentreString(myLanguage[language][33], 224, 164, GFXFF);
|
||||||
|
} else {
|
||||||
|
tft.drawCentreString(String(Squelchold / 10), 224, 164, GFXFF);
|
||||||
|
}
|
||||||
tft.setTextColor(ActiveColor);
|
tft.setTextColor(ActiveColor);
|
||||||
if (Squelch == -1) tft.drawCentreString("ST", 224, 164, GFXFF); else tft.drawCentreString(String(Squelch / 10), 224, 164, GFXFF);
|
if (Squelch == -1) {
|
||||||
|
tft.drawCentreString("ST", 224, 164, GFXFF);
|
||||||
|
} else if (Squelch == 0) {
|
||||||
|
tft.drawCentreString(myLanguage[language][33], 224, 164, GFXFF);
|
||||||
|
} else {
|
||||||
|
tft.drawCentreString(String(Squelch / 10), 224, 164, GFXFF);
|
||||||
|
}
|
||||||
Squelchold = Squelch;
|
Squelchold = Squelch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (seek == false && Squelch != 920) {
|
if (seek == false && Squelch != 920) {
|
||||||
if (Squelch < SStatus || Squelch == -100) {
|
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
|
||||||
radio.setUnMute();
|
radio.setUnMute();
|
||||||
SQ = false;
|
SQ = false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user