minor fix

This commit is contained in:
2025-09-05 17:19:04 +08:00
parent 33184f1ffb
commit 98637a3d03
4 changed files with 5 additions and 5 deletions

View File

@@ -856,7 +856,7 @@ class PreDos(object):
class RobotInit(object):
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str):
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str = ""):
self.hr: HmiRequest = hr
self.pd: PreDos = pd
self.conf_path: str = conf_path
@@ -876,9 +876,9 @@ class RobotInit(object):
if self.conf_path == "":
self.conf_path = f"{clibs.base_path}/assets/confs"
config_files = [
f"{self.conf_path}/fieldbus_device.json",
f"{clibs.base_path}/assets/confs/fieldbus_device.json",
f"{self.conf_path}/registers.json",
f"{self.conf_path}/assets/confs/registers.xml"
f"{self.conf_path}/registers.xml"
]
for config_file in config_files:
filename = os.path.basename(config_file)