decode only if not transmitting- this should avoid some confusion if monitoring is enabled

ls-vhf
DJ2LS 2025-03-28 08:44:47 +01:00
parent 1218174f81
commit 4ab23af52d
1 changed files with 5 additions and 3 deletions

View File

@ -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