From b641b5e0759fbbcce2bba48250ae5900227e9e47 Mon Sep 17 00:00:00 2001 From: Brennmeister Date: Mon, 22 Apr 2024 16:01:12 +0200 Subject: [PATCH 1/3] Fixed typo --- examples/PCIC_TCP_config_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/PCIC_TCP_config_example.py b/examples/PCIC_TCP_config_example.py index 1f877ac..b66071f 100644 --- a/examples/PCIC_TCP_config_example.py +++ b/examples/PCIC_TCP_config_example.py @@ -53,7 +53,7 @@ print("Executing trigger...") trigger_result = pcic.execute_asynchronous_trigger() - # Read next answer is trigger was successful + # Read next answer if trigger was successful if trigger_result == "*": answer = pcic.read_next_answer() print(answer[1].decode()) From 49c77beb6c67515fde32ec8047a61eab135ff29b Mon Sep 17 00:00:00 2001 From: Gann Date: Fri, 3 May 2024 12:13:38 +0200 Subject: [PATCH 2/3] Hotfix: Missing default ROI for autofocus and autoexposure if no parameter given --- source/rpc/imager.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/rpc/imager.py b/source/rpc/imager.py index 2967169..be4b6ca 100644 --- a/source/rpc/imager.py +++ b/source/rpc/imager.py @@ -356,14 +356,16 @@ def startCalculateExposureTime(self, minAnalogGainFactor: int = None, maxAnalogG inputAutoExposure["maxAnalogGainFactor"] = maxAnalogGainFactor if saturatedRatio: inputAutoExposure["saturatedRatio"] = saturatedRatio + # ROIs if ROIs: inputAutoExposure["ROIs"] = ROIs - if RODs and not ROIs: + else: defaultROIsZone = [{"id": 0, "group": 0, "type": "Rect", "width": 1280, - "height": 960, "angle": 0, "center_x": 640, "center_y": 480}] + "height": 960, "angle": 0, "center_x": 640, "center_y": 480}] inputAutoExposure["ROIs"] = defaultROIsZone - if RODs: - inputAutoExposure["RODs"] = RODs + # RODs + if RODs: + inputAutoExposure["RODs"] = RODs self._imagerProxy.proxy.startCalculateExposureTime(json.dumps(inputAutoExposure)) while self.getProgressCalculateExposureTime() < 1.0: time.sleep(1) @@ -386,14 +388,16 @@ def startCalculateAutofocus(self, ROIs: list = None, RODs: list = None) -> None: :return: None """ inputAutoFocus = {} + # ROIs if ROIs: inputAutoFocus["ROIs"] = ROIs - if RODs and not ROIs: + else: defaultROIsZone = [{"id": 0, "group": 0, "type": "Rect", "width": 1280, - "height": 960, "angle": 0, "center_x": 640, "center_y": 480}] + "height": 960, "angle": 0, "center_x": 640, "center_y": 480}] inputAutoFocus["ROIs"] = defaultROIsZone - if RODs: - inputAutoFocus["RODs"] = RODs + # RODs + if RODs: + inputAutoFocus["RODs"] = RODs self._imagerProxy.proxy.startCalculateAutofocus(json.dumps(inputAutoFocus)) while self.getProgressCalculateAutofocus() < 1.0: time.sleep(1) From 9cf5f5be0f21ec9d95d6fd2ca1c15059a98e99ac Mon Sep 17 00:00:00 2001 From: Gann Date: Fri, 3 May 2024 12:16:03 +0200 Subject: [PATCH 3/3] Incremented version number in setup.py script --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ad98522..c08943c 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def read_requires(): setup( name='o2x5xx', - version='0.3.0-beta', + version='0.3.2-beta', description='A Python library for ifm O2x5xx (O2D5xx / O2I5xx) devices', author='Michael Gann', author_email='support.efector.object-ident@ifm.com',