Added auto squelch toggle (H3) to XDRGTK protocol
This commit is contained in:
+26
-18
@@ -470,6 +470,21 @@ void XDRGTKRoutine() {
|
|||||||
if (autosq_read == 0) {
|
if (autosq_read == 0) {
|
||||||
autosquelch = false;
|
autosquelch = false;
|
||||||
DataPrint("H0\n");
|
DataPrint("H0\n");
|
||||||
|
} else if (autosq_read == 1) {
|
||||||
|
autosquelch = true;
|
||||||
|
DataPrint("H1\n");
|
||||||
|
} else {
|
||||||
|
autosquelch = !autosquelch;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (autosquelch) {
|
||||||
|
DataPrint("H1\n");
|
||||||
|
if (!screenmute) {
|
||||||
|
tftPrint(-1, "SQ:", 212, 145, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
showAutoSquelch(1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DataPrint("H0\n");
|
||||||
if (!screenmute) {
|
if (!screenmute) {
|
||||||
if (!usesquelch) {
|
if (!usesquelch) {
|
||||||
tftPrint(-1, "SQ:", 212, 145, BackgroundColor, BackgroundColor, 16);
|
tftPrint(-1, "SQ:", 212, 145, BackgroundColor, BackgroundColor, 16);
|
||||||
@@ -478,13 +493,6 @@ void XDRGTKRoutine() {
|
|||||||
Squelch = -150;
|
Squelch = -150;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
autosquelch = true;
|
|
||||||
DataPrint("H1\n");
|
|
||||||
if (!screenmute) {
|
|
||||||
tftPrint(-1, "SQ:", 212, 145, ActiveColor, ActiveColorSmooth, 16);
|
|
||||||
showAutoSquelch(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -550,12 +558,12 @@ void XDRGTKRoutine() {
|
|||||||
case 'T':
|
case 'T':
|
||||||
unsigned int freqtemp;
|
unsigned int freqtemp;
|
||||||
freqtemp = atoi(buff + 1);
|
freqtemp = atoi(buff + 1);
|
||||||
|
|
||||||
if (BAND_FM) freqtemp -= ConverterSet * 1000;
|
if (BAND_FM) freqtemp -= ConverterSet * 1000;
|
||||||
if (seek) seek = false;
|
if (seek) seek = false;
|
||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
|
|
||||||
if (freqtemp >= LWLowEdgeSet && freqtemp <= LWHighEdgeSet) {
|
if (freqtemp >= LWLowEdgeSet && freqtemp <= LWHighEdgeSet) {
|
||||||
frequency_LW = freqtemp;
|
frequency_LW = freqtemp;
|
||||||
frequency_AM = freqtemp;
|
frequency_AM = freqtemp;
|
||||||
if (afscreen || advancedRDS) {
|
if (afscreen || advancedRDS) {
|
||||||
@@ -617,16 +625,16 @@ void XDRGTKRoutine() {
|
|||||||
SelectBand();
|
SelectBand();
|
||||||
DataPrint("M0\n");
|
DataPrint("M0\n");
|
||||||
}
|
}
|
||||||
radio.SetFreq(frequency);
|
radio.SetFreq(frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (band == BAND_FM) {
|
if (band == BAND_FM) {
|
||||||
DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
|
DataPrint("T" + String((frequency + ConverterSet * 100) * 10) + "\n");
|
||||||
} else if (band == BAND_OIRT) {
|
} else if (band == BAND_OIRT) {
|
||||||
DataPrint("T" + String(frequency_OIRT * 10) + "\n");
|
DataPrint("T" + String(frequency_OIRT * 10) + "\n");
|
||||||
} else {
|
} else {
|
||||||
DataPrint("T" + String(frequency_AM) + "\n");
|
DataPrint("T" + String(frequency_AM) + "\n");
|
||||||
}
|
}
|
||||||
ShowFreq(0);
|
ShowFreq(0);
|
||||||
RDSstatus = false;
|
RDSstatus = false;
|
||||||
store = true;
|
store = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user