From 4ab23af52d91cbff40cd63c19ab844e4427a2c3a Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Fri, 28 Mar 2025 08:44:47 +0100 Subject: [PATCH] decode only if not transmitting- this should avoid some confusion if monitoring is enabled --- freedata_server/demodulator.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/freedata_server/demodulator.py b/freedata_server/demodulator.py index 71f04c7f..3ed75d25 100644 --- a/freedata_server/demodulator.py +++ b/freedata_server/demodulator.py @@ -152,9 +152,11 @@ class Demodulator(): threading.Event().wait(0.01) if audiobuffer.nbuffer >= nin and not self.shutdown_flag.is_set(): # demodulate audio - nbytes = codec2.api.freedv_rawdatarx( - freedv, bytes_out, audiobuffer.buffer.ctypes - ) + if not self.states.isTransmitting(): + nbytes = codec2.api.freedv_rawdatarx( + freedv, bytes_out, audiobuffer.buffer.ctypes + ) + # get current freedata_server states and write to list # 1 trial # 2 sync