Update on behaviour when squelch is disabled.

This commit is contained in:
Sjef Verhoeven PE5PVB
2023-12-01 10:19:03 +01:00
parent 8b3227954e
commit 9de8249191
3 changed files with 7 additions and 3 deletions

View File

@@ -717,6 +717,7 @@ void setup() {
setupmode = false;
if (edgebeep) radio.tone(50, -5, 2000);
radio.I2Sin(false);
if (!usesquelch) radio.setUnMute();
if (screensaverset) {
ScreensaverTimerInit();
ScreensaverTimerSet(screensaverOptions[screensaverset]);
@@ -1929,6 +1930,7 @@ void ModeButtonPress() {
EEPROM.writeByte(EE_BYTE_FMSCANSENS, fmscansens);
EEPROM.commit();
if (af == 2) radio.rds.afreg = true; else radio.rds.afreg = false;
if (!usesquelch) radio.setUnMute();
Serial.end();
if (wifi) remoteip = IPAddress (WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], subnetclient);
if (USBmode) Serial.begin(19200); else Serial.begin(115200);
@@ -2737,8 +2739,8 @@ void ShowModLevel() {
}
void doSquelch() {
if (!XDRGTKUSB && !XDRGTKTCP) {
if (usesquelch) Squelch = analogRead(PIN_POT) / 4 - 100; else Squelch = 0;
if (!XDRGTKUSB && !XDRGTKTCP && usesquelch) {
Squelch = analogRead(PIN_POT) / 4 - 100;
if (unit == 0) SquelchShow = Squelch / 10;
if (unit == 1) SquelchShow = ((Squelch * 100) + 10875) / 1000;
if (unit == 2) SquelchShow = round((float(Squelch) / 10.0 - 10.0 * log10(75) - 90.0) * 10.0) / 10;
@@ -2805,7 +2807,7 @@ void doSquelch() {
}
}
}
} else {
} else if (usesquelch) {
if (Squelch != 920) {
if (Squelch < SStatus || Squelch == -100 || Squelch == 0) {
if (!seek) radio.setUnMute();

View File

@@ -522,6 +522,7 @@ void XDRGTKRoutine() {
radio.setSoftmuteFM(softmutefm);
radio.setSoftmuteAM(softmuteam);
if (screenmute) MuteScreen(0);
if (!usesquelch) radio.setUnMute();
break;
case 'Z':

View File

@@ -29,6 +29,7 @@ extern bool softmutefm;
extern bool SQ;
extern bool StereoToggle;
extern bool store;
extern bool usesquelch;
extern bool wifi;
extern bool wificonnected;
extern bool XDRGTKdata;