From 69b2802895cd7f6cdebba637b24eab655d9539ed Mon Sep 17 00:00:00 2001 From: Ivey Song Date: Sat, 6 Jun 2026 10:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=87=E5=8E=BB=E7=9A=84pt?= =?UTF-8?q?h=20=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Decoder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Decoder.py b/Decoder.py index c07dce6..3ef8daf 100644 --- a/Decoder.py +++ b/Decoder.py @@ -1,4 +1,6 @@ import ast +import glob +import os import threading from datetime import datetime import multiprocessing as mp @@ -167,9 +169,11 @@ class Decoder_main(threading.Thread, device_type): self.b_design = signal.firwin(65, [bandPass_low / (self.fs/2), bandPass_high / (self.fs/2)], pass_zero=False) # 设计8-30Hz带通滤波器 fileName = 'Model_' + datetime.now().strftime('%Y-%m-%d-%H-%M-%S') filePath = './online_Models/' + for old_pth in glob.glob(os.path.join(filePath, '*.pth')): + os.remove(old_pth) self.modelPath = ''.join([filePath, fileName, '.pth']) - self.mp_data_queue = mp.Queue() #多进程传参队列 - self.mp_result_queue = mp.Queue() #多进程结果队列 + self.mp_data_queue = mp.Queue() + self.mp_result_queue = mp.Queue() def preprocess(self, signal_data): # # 计算每行的平均值