From 0c57edf52a3a5f3029a747ef35ad8fbfc3b6b27b Mon Sep 17 00:00:00 2001 From: vc4 <287920192@qq.com> Date: Wed, 1 Oct 2025 11:57:58 +0800 Subject: [PATCH] fix rts/dtr --- scomm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scomm.py b/scomm.py index 881ba9b..ada0053 100755 --- a/scomm.py +++ b/scomm.py @@ -173,8 +173,8 @@ class UIProcessor: self.ckbtn_shex.var.set(1 if hex_flag else 0) self.wait_send_data.update({ - 'rts': rts if rts is not None else self.wait_send_data['rts'], - 'dtr': dtr if dtr is not None else self.wait_send_data['dtr'] + 'rts': rts, + 'dtr': dtr }) def get_send_data(self, cache: bool = True) -> Dict[str, Any]: @@ -204,7 +204,6 @@ class UIProcessor: except Exception as e: logger.error(f"处理发送数据时出错: {e}") self.wait_send_data['text'] = b'' - return self.wait_send_data def dmesg(self, category: str, data: bytes): @@ -530,6 +529,8 @@ class SerialCommunicator: # 设置数据准备事件,唤醒发送线程 self.data_ready.set() + # 手动发送时不操作dtr/rts + self.ui.set_send_data(rts=None, dtr=None) def _send_data(self): """实际发送数据"""