minor fix

This commit is contained in:
2025-09-05 18:39:40 +08:00
parent 98637a3d03
commit 4bacbb7bb8
4 changed files with 7 additions and 273 deletions

View File

@@ -856,10 +856,10 @@ class PreDos(object):
class RobotInit(object):
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str = ""):
def __init__(self, hr: HmiRequest, pd: PreDos, reg_path: str = ""):
self.hr: HmiRequest = hr
self.pd: PreDos = pd
self.conf_path: str = conf_path
self.reg_path: str = reg_path
def robot_init(self):
# 推送配置文件
@@ -873,12 +873,12 @@ class RobotInit(object):
user_settings = "/home/luoshi/bin/controller/user_settings"
interactive_data = f"/home/luoshi/bin/controller/interactive_data/{robot_type}"
if self.conf_path == "":
self.conf_path = f"{clibs.base_path}/assets/confs"
if self.reg_path == "":
self.reg_path = f"{clibs.base_path}/assets/confs"
config_files = [
f"{clibs.base_path}/assets/confs/fieldbus_device.json",
f"{self.conf_path}/registers.json",
f"{self.conf_path}/registers.xml"
f"{self.reg_path}/registers.json",
f"{self.reg_path}/registers.xml"
]
for config_file in config_files:
filename = os.path.basename(config_file)