Modified AF tester to improve audio dropouts

This commit is contained in:
Sjef Verhoeven PE5PVB
2024-12-19 10:22:22 +01:00
parent 912e2c1b97
commit 74b7bb979e

View File

@@ -84,13 +84,14 @@ uint16_t TEF6686::TestAF() {
for (int x = 0; x < af_counter; x++) { for (int x = 0; x < af_counter; x++) {
timing = 0; timing = 0;
devTEF_Set_Cmd(TEF_FM, Cmd_Tune_To, 7, 3, af[x].frequency); devTEF_Set_Cmd(TEF_FM, Cmd_Tune_To, 7, 3, af[x].frequency);
delay(2);
while (timing == 0 && !bitRead(timing, 15)) { while (timing == 0 && !bitRead(timing, 15)) {
devTEF_Radio_Get_Quality_Status(&status, &aflevel, &afusn, &afwam, &afoffset, &dummy1, &dummy2, &dummy3); devTEF_Radio_Get_Quality_Status(&status, &aflevel, &afusn, &afwam, &afoffset, &dummy1, &dummy2, &dummy3);
timing = lowByte(status); timing = lowByte(status);
} }
delay(2);
af[x].score = aflevel - afusn - afwam; af[x].score = aflevel - afusn - afwam;
if (afoffset < -125 || afoffset > 125) af[x].score = -32767; if (afoffset < -125 || afoffset > 125) af[x].score = -32767;
delay(10);
} }
int16_t highestValue = af[0].score; int16_t highestValue = af[0].score;