Fix AttributeError: 'ConfigReader' object has no attribute 'vision_config' in hikrobot_sc.py
This commit is contained in:
parent
a366884a5f
commit
c5aea0f387
|
|
@ -85,8 +85,8 @@ class HikrobotSmartCamera(Component):
|
|||
return -2
|
||||
|
||||
# Set the camera recipe
|
||||
if self.config.vision_config.get("solution_name",None) is not None:
|
||||
solutionName = self.config.vision_config["solution_name"]
|
||||
if self.config.get("general", {}).get("solution_name", None) is not None:
|
||||
solutionName = self.config["general"]["solution_name"]
|
||||
mv_lib.MV_VS_SetStringValue(pHandle, "SrcOperateSolutionName", solutionName)
|
||||
mv_lib.MV_VS_SetCommandValue(pHandle, "CommandProjectLoad")
|
||||
time.sleep(5)
|
||||
|
|
@ -105,7 +105,7 @@ class HikrobotSmartCamera(Component):
|
|||
return
|
||||
concat_frame = None
|
||||
concat_results = []
|
||||
rot = self.config.vision_config["rotations"].split(",")
|
||||
rot = self.config["general"]["rotations"].split(",")
|
||||
for cam_idx in range(self.num_cameras):
|
||||
cam = self.cam_list[cam_idx]
|
||||
self.log.info(f"GET FRAME CAMERA # {cam_idx}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user