RTL - RMS based soft squelch and tweaks; #125

This commit is contained in:
lwvmobile
2023-05-19 11:27:13 -04:00
parent bf4a4b574c
commit 0842613b24
7 changed files with 52 additions and 16 deletions

View File

@@ -448,6 +448,18 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
state->minref = state->min;
}
//if using an rtl input method, do not look for sync patterns if the rms value is lower than our 'soft squelch' level
if (opts->audio_in_type == 3 && opts->rtl_rms < opts->rtl_squelch_level) //tests show floor level around 40, and signal breaking 100, default is 100 for level
{
if (opts->frame_nxdn48 == 1 || opts->frame_nxdn96 == 1 || opts->frame_dpmr == 1)
{
goto SYNC_TEST_END;
//should we update min/max here? yes or no?
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
}
}
strncpy (synctest, (synctest_p - 23), 24);
if (opts->frame_p25p1 == 1)
{
@@ -1553,6 +1565,8 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
}
#endif //End Provoice Conventional
SYNC_TEST_END: ; //do nothing
} // t >= 10
if (exitflag == 1)