配线app可用
This commit is contained in:
@@ -677,8 +677,18 @@ class PowerManagerApp:
|
||||
|
||||
bus["faults"]["DC/DC故障1"] = msg.dcDcFaultWord1
|
||||
bus["faults"]["DC/DC故障2"] = msg.dcDcFaultWord2
|
||||
bus["insulation"]["动力母线绝缘状态"] = msg.powerBusInsulationStatus
|
||||
bus["insulation"]["A母线绝缘状态"] = msg.aBusInsulationStatus
|
||||
|
||||
if msg.powerBusInsulationStatus == 0x55:
|
||||
bus["insulation"]["动力母线绝缘状态"] = 0
|
||||
else:
|
||||
bus["insulation"]["动力母线绝缘状态"] = 1
|
||||
|
||||
if msg.aBusInsulationStatus == 0x55:
|
||||
bus["insulation"]["A母线绝缘状态"] = 0
|
||||
else:
|
||||
bus["insulation"]["A母线绝缘状态"] = 1
|
||||
|
||||
# bus["insulation"]["A母线绝缘状态"] = msg.aBusInsulationStatus
|
||||
bus["alarms"]["仪表电源丢失信号"] = msg.meterPowerLossSignal
|
||||
bus["alarms"]["应急电源丢失信号"] = msg.emergencyPowerLossSignal
|
||||
bus["cool_water_pressure"] = msg.coolWaterPressure / 10.0
|
||||
@@ -937,9 +947,11 @@ class PowerManagerApp:
|
||||
# 更新断路器状态
|
||||
for name, state in status['breakers'].items():
|
||||
if name in self.high_vol_breakers:
|
||||
canvas = self.high_vol_breakers[name]
|
||||
color = 'green' if state else 'red'
|
||||
self.high_vol_breakers[name].config(background=color)
|
||||
|
||||
canvas.delete("all")
|
||||
canvas.create_oval(2, 2, 18, 18, fill=color, outline="black")
|
||||
|
||||
# 更新DC/DC故障状态
|
||||
dcdc_fault1 = status['faults']['DC/DC故障1']
|
||||
dcdc_fault2 = status['faults']['DC/DC故障2']
|
||||
@@ -954,8 +966,8 @@ class PowerManagerApp:
|
||||
insulation_power = status['insulation']['动力母线绝缘状态']
|
||||
insulation_a = status['insulation']['A母线绝缘状态']
|
||||
|
||||
power_text = "故障" if insulation_power else f"正常({status['voltage']['动力母线电压']:.1f}MΩ)"
|
||||
a_text = "故障" if insulation_a else f"正常({status['voltage']['A母线电压']:.1f}MΩ)"
|
||||
power_text = "故障" if insulation_power else f"正常"
|
||||
a_text = "故障" if insulation_a else f"正常"
|
||||
|
||||
self.high_vol_power_insulation.config(text=power_text)
|
||||
self.high_vol_a_insulation.config(text=a_text)
|
||||
|
||||
Reference in New Issue
Block a user