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")