Merge branch 'feature/main_ui' of http://www.xj-robot.com:3000/xiongyi/Feeding_control_system into feature/main_ui
This commit is contained in:
@ -63,6 +63,33 @@ class MainController:
|
||||
"""更新UI状态"""
|
||||
# print(f"更新UI状态: {prop} = {value}")
|
||||
|
||||
if prop == "feed_status" and value == 4:
|
||||
# 盖板到位的情况, 更新 管片任务 (目前)
|
||||
self.main_window.update_segment_tasks()
|
||||
return
|
||||
|
||||
if prop == "mould_finish_weight":
|
||||
# 模具车中料的重量
|
||||
current_mould_weight = value
|
||||
if self.system.state._mould_need_weight != 0:
|
||||
# 计算 模具车 和 生产进度
|
||||
progress = int((current_mould_weight / self.system.state._mould_need_weight) * 100) # 去掉百分号之后的整数
|
||||
progress = min(progress, 100) # 限制为100
|
||||
self.main_window.arc_progress.setProgress(progress)
|
||||
self.main_window.production_progress.setProgress(progress)
|
||||
return
|
||||
|
||||
if prop == "upper_volume":
|
||||
# 上料斗方量
|
||||
self.hopper_controller.onUpdateUpperHopperVolume(value)
|
||||
return
|
||||
|
||||
if prop == "lower_weight":
|
||||
# 低位料斗重量
|
||||
self.hopper_controller.onUpdateLowerHopperWeight(value)
|
||||
return
|
||||
|
||||
|
||||
def __connectSignals(self):
|
||||
self.main_window.about_to_close.connect(self.handleMainWindowClose) # 处理主界面关闭
|
||||
|
||||
|
||||
Reference in New Issue
Block a user