From 9e49f3f40d58fb4b3c67e6de2f5c5b0c19e95038 Mon Sep 17 00:00:00 2001 From: Marco Cogoni Date: Sat, 8 May 2021 19:59:14 +0200 Subject: [PATCH] fixed dxcluster ringing bell and windows crash on wav recording --- supersdr.py | 2 +- utils_supersdr.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/supersdr.py b/supersdr.py index 016274e..0df3f45 100755 --- a/supersdr.py +++ b/supersdr.py @@ -275,7 +275,7 @@ def plot_eibi(surface_): radio_mode = "USB" kiwi_filter = filtering(KIWI_RATE/2, AUDIO_RATE) -audio_rec = audio_recording("supersdr_%s.wav"%datetime.now()) +audio_rec = audio_recording("supersdr_%s.wav"%datetime.now().isoformat().split(".")[0].replace(":", "_")) print(kiwi_host, kiwi_port, kiwi_password, zoom, freq) #init KIWI WF and RX audio diff --git a/utils_supersdr.py b/utils_supersdr.py index 7786ef3..4042662 100644 --- a/utils_supersdr.py +++ b/utils_supersdr.py @@ -177,12 +177,12 @@ def send(self, msg): def receive(self): msg = self.sock.recv(2048) - return msg.decode("latin-1") + return msg.decode("utf-8") def run(self, kiwi_snd): while not kiwi_snd.terminate: dx_cluster_msg = self.receive() - print(dx_cluster_msg) + print("%s"%dx_cluster_msg.rstrip('\r\n').replace("\x07", "")) time.sleep(5)