From 77d3b964ef8dc5e33625779969d025b7ea028bd6 Mon Sep 17 00:00:00 2001 From: ranchuan Date: Wed, 13 Dec 2023 18:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=B3=E9=97=ADdhcp?= =?UTF-8?q?=E6=97=B6=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=B3=E9=97=AD=E8=BD=AF=E4=BB=B6=E6=97=B6?= =?UTF-8?q?dhcp=E7=BA=BF=E7=A8=8B=E6=9C=AA=E9=80=80=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.txt | 2 ++ coder_2ch/prottcp.py | 6 +++++- updata/updata_ssh.py | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ReadMe.txt b/ReadMe.txt index e47737d..90cb4fd 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -120,5 +120,7 @@ 添加huffman压缩编码,已完成编码,未验证 2023.12.9 删除huffman相关,分析工具不过滤异常数据 +2023.12.13 + 解决关闭dhcp时崩溃的问题,解决关闭软件时dhcp线程未退出的问题 diff --git a/coder_2ch/prottcp.py b/coder_2ch/prottcp.py index 3178bfa..f3ea2b3 100644 --- a/coder_2ch/prottcp.py +++ b/coder_2ch/prottcp.py @@ -489,6 +489,9 @@ if __name__ == "__main__": # data=bytearray([0x01,100,0]) # data=bytearray([0x02]) # 上升 # data=bytearray([0x03]) # 下降 + # 直接测量 + u.cmd=0x44 + data=bytearray([5]) print(u.encode(data).hex(' ')) # with open("file/EX_Coder_Test_2023-07-6.json","rb") as f: @@ -511,5 +514,6 @@ if __name__ == "__main__": # 59 6d 03 00 30 00 00 60 0f # 结束应答 # 59 6D 03 00 31 00 00 31 CF - +# 直接检测 +# 59 6d 04 00 44 00 00 05 d5 6c diff --git a/updata/updata_ssh.py b/updata/updata_ssh.py index 2acd41b..0af4639 100644 --- a/updata/updata_ssh.py +++ b/updata/updata_ssh.py @@ -160,6 +160,8 @@ class updata_dlg(QWidget): if(self.udp is not None): print("close udp thread") self.udp.close() + if(self.dhcp_server is not None): + self.dhcp_server.close() # 初始化文件列表 def file_list_init(self): @@ -546,7 +548,7 @@ class updata_dlg(QWidget): self.dhcp_server.run_in_thread() else: self.dhcp_but.setEnabled(False) - self.dhcp_server.new_ip_addr_signal.disconnect(dlg.add_slave_slot) + self.dhcp_server.new_ip_addr_signal.disconnect(self.add_slave_slot) self.dhcp_server.close() def dhcp_start_slot(self): self.dhcp_but.setText("关闭DHCP")