Remove CN/SNR
This commit is contained in:
+3
-4
@@ -350,11 +350,11 @@ void TEF6686::setStHiBlendOffset(uint8_t start) {
|
||||
}
|
||||
}
|
||||
|
||||
void TEF6686::getStatus(int16_t *level, uint16_t *USN, uint16_t *WAM, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel, int8_t *snr) {
|
||||
devTEF_Radio_Get_Quality_Data(NULL, level, USN, WAM, offset, bandwidth, audiolevel, snr);
|
||||
void TEF6686::getStatus(int16_t *level, uint16_t *USN, uint16_t *WAM, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel) {
|
||||
devTEF_Radio_Get_Quality_Data(NULL, level, USN, WAM, offset, bandwidth, audiolevel);
|
||||
}
|
||||
|
||||
void TEF6686::getStatusAM(int16_t *level, uint16_t *noise, uint16_t *cochannel, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel, int8_t *snr) {
|
||||
void TEF6686::getStatusAM(int16_t *level, uint16_t *noise, uint16_t *cochannel, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel) {
|
||||
uint8_t buf[14];
|
||||
devTEF_Get_Cmd(TEF_AM, Cmd_Get_Quality_Status, buf, sizeof(buf));
|
||||
if(level != NULL) *level = Convert8bto16b(buf + 2);
|
||||
@@ -365,7 +365,6 @@ void TEF6686::getStatusAM(int16_t *level, uint16_t *noise, uint16_t *cochannel,
|
||||
if(audiolevel != NULL) *audiolevel = Convert8bto16b(buf + 12) / 10;
|
||||
if(level != NULL && *level < -200) *level = -200;
|
||||
if(level != NULL && *level > 1200) *level = 1200;
|
||||
if(snr != NULL) *snr = int(0.46222375 * (float)(*level) / 10 - 0.082495118 * (float)(*noise / 50) / 10) + 10;
|
||||
}
|
||||
|
||||
void TEF6686::readRDS(byte showrdserrors) {
|
||||
|
||||
@@ -33,7 +33,7 @@ uint8_t devTEF_APPL_Get_Operation_Status() {
|
||||
return Convert8bto16b(buf);
|
||||
}
|
||||
|
||||
void devTEF_Radio_Get_Quality_Data(uint16_t *status, int16_t *level, uint16_t *usn, uint16_t *wam, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel, int8_t *snr) {
|
||||
void devTEF_Radio_Get_Quality_Data(uint16_t *status, int16_t *level, uint16_t *usn, uint16_t *wam, int16_t *offset, uint16_t *bandwidth, uint16_t *audiolevel) {
|
||||
uint8_t buf[14];
|
||||
devTEF_Get_Cmd(TEF_FM, Cmd_Get_Quality_Data, buf, sizeof(buf));
|
||||
|
||||
@@ -50,7 +50,6 @@ void devTEF_Radio_Get_Quality_Data(uint16_t *status, int16_t *level, uint16_t *u
|
||||
if(offset != NULL) *offset = Convert8bto16b(buf + 8);
|
||||
if(bandwidth != NULL) *bandwidth = Convert8bto16b(buf + 10) / 10;
|
||||
if(audiolevel != NULL) *audiolevel = Convert8bto16b(buf + 12) / 10;
|
||||
if(snr != NULL) *snr = (int8_t)(_level * 0.0675f - (_usn * 0.038f) - (_wam * 0.018f));
|
||||
}
|
||||
|
||||
void devTEF_Radio_Get_RDS_Status(uint16_t *status, uint16_t *A_block, uint16_t *B_block, uint16_t *C_block, uint16_t *D_block, uint16_t *dec_error) {
|
||||
|
||||
+1
-1
@@ -776,7 +776,7 @@ void XDRGTKRoutine() {
|
||||
delay(5);
|
||||
DataPrint(String(freq_scan * 10, DEC));
|
||||
DataPrint(" = ");
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN); else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus); else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
DataPrint(String((SStatus / 10) + 10, DEC));
|
||||
DataPrint(", ");
|
||||
}
|
||||
|
||||
+3
-3
@@ -2290,7 +2290,7 @@ void Seek(bool mode) {
|
||||
}
|
||||
|
||||
if (band < BAND_GAP) {
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
if (isSignalQualityGood(USN, WAM, OStatus) && (!usesquelch || (Squelch < SStatus || Squelch == SQUELCH_MAX_VALUE))) {
|
||||
seek = false;
|
||||
radio.setUnMute();
|
||||
@@ -2302,7 +2302,7 @@ void Seek(bool mode) {
|
||||
if (RDSSPYTCP) RemoteClient.print("G:\r\nRESET-------\r\n\r\n");
|
||||
}
|
||||
} else {
|
||||
radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
if ((USN < amscansens * 30) && (OStatus < 2 && OStatus > -2) && (!usesquelch || (Squelch < SStatus || Squelch == 920))) {
|
||||
seek = false;
|
||||
radio.setUnMute();
|
||||
@@ -2339,7 +2339,7 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
|
||||
radio.SetFreq(frequency);
|
||||
radio.clearRDS();
|
||||
delay(DELAY_TUNE_MS);
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
if (isSignalQualityGood(USN, WAM, OStatus)) {
|
||||
for (byte y = 0; y < 20; y++) {
|
||||
delay(DELAY_RDS_READ_MS);
|
||||
|
||||
@@ -218,8 +218,6 @@ int8_t USold = 0;
|
||||
int8_t LevelOffset;
|
||||
int8_t LowLevelSet;
|
||||
int8_t Timezone;
|
||||
int8_t CN;
|
||||
int8_t CNold;
|
||||
RTC_DATA_ATTR int8_t VolSet;
|
||||
float batteryVold;
|
||||
IPAddress remoteip;
|
||||
|
||||
@@ -3036,7 +3036,6 @@ void BuildDisplay() {
|
||||
if (usesquelch || autosquelch) tftPrint(ALEFT, "SQ:", 197, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "US:", 259, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "MP:", 259, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ALEFT, "CN:", 197, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "dB", 255, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "%", 316, 165, ActiveColor, ActiveColorSmooth, 16);
|
||||
tftPrint(ARIGHT, "%", 316, 147, ActiveColor, ActiveColorSmooth, 16);
|
||||
|
||||
+6
-19
@@ -709,12 +709,10 @@ void doSquelch() {
|
||||
|
||||
void ShowSignalLevel() {
|
||||
SAvg = (((SAvg * 9) + 5) / 10) + SStatus;
|
||||
SAvg2 = (((SAvg2 * 9) + 5) / 10) + CN;
|
||||
SAvg4 = (((SAvg4 * 9) + 5) / 10) + WAM;
|
||||
SAvg5 = (((SAvg5 * 9) + 5) / 10) + USN;
|
||||
|
||||
SStatus = SAvg / 10;
|
||||
CN = SAvg2 / 10;
|
||||
MP = SAvg4 / 10;
|
||||
US = SAvg5 / 10;
|
||||
|
||||
@@ -722,17 +720,6 @@ void ShowSignalLevel() {
|
||||
if (millis() >= SNRupdatetimer + TIMER_SNR_TIMER) {
|
||||
SNRupdatetimer = millis();
|
||||
if (!advancedRDS) {
|
||||
if (CN > (CNold + 1) || CN < (CNold - 1)) {
|
||||
if (CNold == -126) tftPrint16(ARIGHT, "--", 234, 165, BackgroundColor, BackgroundColor); else tftPrint16(ARIGHT, String(CNold), 234, 165, BackgroundColor, BackgroundColor);
|
||||
if (tuned) {
|
||||
tftPrint16(ARIGHT, String(CN), 234, 165, PrimaryColor, PrimaryColorSmooth);
|
||||
CNold = CN;
|
||||
} else {
|
||||
tftPrint16(ARIGHT, "--", 234, 165, PrimaryColor, PrimaryColorSmooth);
|
||||
CNold = -126;
|
||||
}
|
||||
}
|
||||
|
||||
byte MPprint = constrain(map(MP, 0, 1000, 0, 100), 0, 100);
|
||||
if (MPprint != MPold) {
|
||||
tftReplace(ARIGHT, String(MPold), (band < BAND_GAP ? String(MPprint) : "--"), 299, 165, PrimaryColor, PrimaryColorSmooth, BackgroundColor, 16);
|
||||
@@ -795,7 +782,7 @@ void ShowSignalLevel() {
|
||||
}
|
||||
|
||||
if (!seek) {
|
||||
if (tuned && CN > 15 && SStatus > 300) {
|
||||
if (tuned && SStatus > 300) {
|
||||
if (!setextendbw) {
|
||||
setextendbw = true;
|
||||
radio.extendBW(true);
|
||||
@@ -1152,7 +1139,7 @@ void loop() {
|
||||
}
|
||||
|
||||
if (!scanholdflag) delay(75);
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
|
||||
if (!initdxscan) {
|
||||
switch (scancancel) {
|
||||
@@ -1354,8 +1341,8 @@ void loop() {
|
||||
if (millis() >= lowsignaltimer + 300) {
|
||||
lowsignaltimer = millis();
|
||||
if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) {
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
}
|
||||
if (!BWtune && !menu) {
|
||||
doSquelch();
|
||||
@@ -1365,8 +1352,8 @@ void loop() {
|
||||
|
||||
} else {
|
||||
if (af || (!screenmute || (screenmute && (XDRGTKTCP || XDRGTKUSB)))) {
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus, &CN);
|
||||
if (band < BAND_GAP) radio.getStatus(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
else radio.getStatusAM(&SStatus, &USN, &WAM, &OStatus, &BW, &MStatus);
|
||||
}
|
||||
if (!BWtune && !menu) {
|
||||
doSquelch();
|
||||
|
||||
Reference in New Issue
Block a user