From 725a0ffd218092136d8e76a5e6f6b8b1f4971224 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Fri, 19 Jul 2024 22:11:29 +0200 Subject: [PATCH] Ignore the squelch while receiving a packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- impl/src/layer1/rx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/impl/src/layer1/rx.c b/impl/src/layer1/rx.c index e264178..0f8b1cf 100644 --- a/impl/src/layer1/rx.c +++ b/impl/src/layer1/rx.c @@ -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)) { case SQUELCH_CLOSED: - // ignore this sample - continue; + if(rx->state == RX_STATE_ACQUISITION) { + // ignore this sample + continue; + } + break; case SQUELCH_JUST_OPENED: 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) { - return is_squelch_open(rx); + return (rx->state != RX_STATE_ACQUISITION) || is_squelch_open(rx); }