Ignore the squelch while receiving a packet

Before this commit, samples could be dropped during packet reception, which for
sure destroys the current packet and potentially the following one. Now samples
are stored even if the squelch „closes“, and decoding will potentially fail due
to high noise, but not due to missing samples.
This commit is contained in:
Thomas Kolb 2024-07-19 22:11:29 +02:00
parent 60d7fbf373
commit 725a0ffd21

View file

@ -274,8 +274,11 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t
switch(update_and_check_squelch(rx, i)) { switch(update_and_check_squelch(rx, i)) {
case SQUELCH_CLOSED: case SQUELCH_CLOSED:
if(rx->state == RX_STATE_ACQUISITION) {
// ignore this sample // ignore this sample
continue; continue;
}
break;
case SQUELCH_JUST_OPENED: case SQUELCH_JUST_OPENED:
symsync_crcf_reset(rx->symsync); symsync_crcf_reset(rx->symsync);
@ -614,7 +617,7 @@ result_t layer1_rx_reset(layer1_rx_t *rx)
bool layer1_rx_is_busy(const layer1_rx_t *rx) bool layer1_rx_is_busy(const layer1_rx_t *rx)
{ {
return is_squelch_open(rx); return (rx->state != RX_STATE_ACQUISITION) || is_squelch_open(rx);
} }