feat: 优化主窗口字段处理逻辑,跳过线径公差、材质和打印材质字段的日志记录,移除无用的IP地址赋值和加载信息清空操作
This commit is contained in:
parent
69c8626888
commit
2e5a31e904
BIN
db/jtDB.db
BIN
db/jtDB.db
Binary file not shown.
@ -2534,8 +2534,8 @@ class MainWindow(MainWindowUI):
|
|||||||
|
|
||||||
for field_name, field_key in self.FIELD_MAPPING.items():
|
for field_name, field_key in self.FIELD_MAPPING.items():
|
||||||
# 过滤掉线径公差字段,因为线径数据是通过线径仪获取的,不需要从前端托盘入库地方获取
|
# 过滤掉线径公差字段,因为线径数据是通过线径仪获取的,不需要从前端托盘入库地方获取
|
||||||
if field_name == "线径公差":
|
if field_name == "线径公差" or field_name == "材质" or field_name == "打印材质":
|
||||||
logging.debug(f"跳过线径公差字段,该字段由线径仪获取")
|
logging.debug(f"跳过线径公差、材质、打印材质字段,该字段由接口获取")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
logging.debug(f"处理字段: {field_name} -> {field_key}")
|
logging.debug(f"处理字段: {field_name} -> {field_key}")
|
||||||
@ -2613,7 +2613,6 @@ class MainWindow(MainWindowUI):
|
|||||||
logging.error(f"获取本机IP失败: {str(e)}")
|
logging.error(f"获取本机IP失败: {str(e)}")
|
||||||
# 如果获取失败,使用本地回环地址
|
# 如果获取失败,使用本地回环地址
|
||||||
info['nw_ip'] = '127.0.0.1'
|
info['nw_ip'] = '127.0.0.1'
|
||||||
# info['nw_ip'] = '192.168.1.246'
|
|
||||||
# 调试:检查线材类型字段
|
# 调试:检查线材类型字段
|
||||||
wire_type_value = info.get('xclx', 'NOT_FOUND')
|
wire_type_value = info.get('xclx', 'NOT_FOUND')
|
||||||
logging.info(f"准备调用接口,线材类型字段值: {wire_type_value}")
|
logging.info(f"准备调用接口,线材类型字段值: {wire_type_value}")
|
||||||
@ -2965,8 +2964,6 @@ class MainWindow(MainWindowUI):
|
|||||||
self._current_stow_num -= 1
|
self._current_stow_num -= 1
|
||||||
if self._current_stow_num == 0:
|
if self._current_stow_num == 0:
|
||||||
self._is_loading_active = False # 任务完成,标记为非活动
|
self._is_loading_active = False # 任务完成,标记为非活动
|
||||||
self._loading_info = None
|
|
||||||
logging.info("所有层拆垛完成,清空上料信息")
|
|
||||||
message = f"第 {completed_layer_num} 层(最后一层)拆垛完成!"
|
message = f"第 {completed_layer_num} 层(最后一层)拆垛完成!"
|
||||||
# 重置寄存器 0 和 2 为 0
|
# 重置寄存器 0 和 2 为 0
|
||||||
modbus.write_register_until_success(client, 0, 0)
|
modbus.write_register_until_success(client, 0, 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user