为操作指令增加了数据库写入代码

This commit is contained in:
zjk
2025-02-18 18:46:17 +08:00
parent a179789b3f
commit 7dac85505b
8 changed files with 324 additions and 44 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class logWin(Frame):
def __init__(self, root):
super().__init__(root)
self.root = root
custom_font = font.Font(family="Arial", size=12, weight="normal")
custom_font = font.Font(family="Arial", size=8)
# 设置 state 为 tk.DISABLED 禁用编辑功能
self.text_box = tk.Text(root, height=10, width=50, font=custom_font, state=tk.DISABLED)
+3
View File
@@ -38,6 +38,9 @@ def receive_messages(sock, logwin:logWin, disSysWin:disSys):
logWin.display_log(logwin,f"{formatted_time}->接收到来自 {address} | 高压汇流排B配电指令:")
elif(msg_id==0x0004):
logWin.display_log(logwin,f"{formatted_time}->接收到来自 {address} | 低压母线配电指令:")
elif(start1==0x20 and start2==0x20):
if(msg_id==0x0050):
logWin.display_log(logwin,f"{formatted_time}->接收到来自 {address} | CCU控制指令:")
def send_messages(sock, logwin:logWin, disSysWin:disSys,ccuSysWin:ccuSys):