增加了info字段,增加了上电检测,调整了绝缘电阻上报逻辑
This commit is contained in:
@@ -3,6 +3,7 @@ from tkinter import ttk
|
||||
import socket
|
||||
import threading
|
||||
import time
|
||||
import struct
|
||||
from db import DB
|
||||
import os
|
||||
from udpMsg import (
|
||||
@@ -15,6 +16,10 @@ from udpMsg import (
|
||||
msg_disLVMBCmdMsg,
|
||||
msg_disLVBCmdMsg
|
||||
)
|
||||
from ccuMsg import (
|
||||
msg_ccUFbMsg,
|
||||
# msg_ccUCmdMsg
|
||||
)
|
||||
|
||||
class PowerManagerApp:
|
||||
def __init__(self, root):
|
||||
@@ -32,6 +37,7 @@ class PowerManagerApp:
|
||||
self.simulation_HVBACmdMsg = msg_disHVBACmdMsg()
|
||||
self.simulation_LVMBCmdMsg = msg_disLVMBCmdMsg()
|
||||
self.simulation_LVBCmdMsg = msg_disLVBCmdMsg()
|
||||
self.simulation_ccUFbMsg = msg_ccUFbMsg()
|
||||
|
||||
# 菜单栏复选框状态变量
|
||||
self.menu_checkbox_vars = {
|
||||
@@ -1774,27 +1780,33 @@ class PowerManagerApp:
|
||||
# time.sleep(0.1) # 1秒间隔
|
||||
# 处理高压母线数据
|
||||
packed_data = self.simulation_HighVolBusFbMsg.pack()
|
||||
error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(error_packed_data, self.udp_ip, self.udp_control_port)
|
||||
# time.sleep(0.1)
|
||||
# error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01)
|
||||
|
||||
# 处理高压A母线数据
|
||||
packed_data = self.simulation_HighAVolBusFbMsg.pack()
|
||||
error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(error_packed_data, self.udp_ip, self.udp_control_port)
|
||||
# time.sleep(0.01)
|
||||
# error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01)
|
||||
|
||||
# 处理低压母线数据
|
||||
packed_data = self.simulation_LowBusFbMsg.pack()
|
||||
error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(error_packed_data, self.udp_ip, self.udp_control_port)
|
||||
# time.sleep(0.01)
|
||||
# error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01)
|
||||
|
||||
# 处理仪表主母线数据
|
||||
packed_data = self.simulation_LowMainBusFbMsg.pack()
|
||||
error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(error_packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01) # 1秒间隔
|
||||
# error_packed_data = packed_data[:-1] + b'\x00' # 修改校验位为0x00
|
||||
self.send_udp_command(packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01)
|
||||
|
||||
packed_data = self.simulation_ccUFbMsg.pack()
|
||||
self.send_udp_command(packed_data, self.udp_ip, self.udp_control_port)
|
||||
time.sleep(0.01)
|
||||
|
||||
time.sleep(0.7) # 循环间隔
|
||||
def on_connection_changed(self, *args):
|
||||
"""连接状态改变回调"""
|
||||
if self.Start_Connection.get():
|
||||
|
||||
Reference in New Issue
Block a user