From b7f1584562580e82b7e5b9d3223668783fce8541 Mon Sep 17 00:00:00 2001 From: Satja Sivcev Date: Tue, 4 Jan 2022 15:54:18 +0100 Subject: [PATCH] Update samples reading setting from file Update samples that read settings from sample data, because settings folder name have changed, e.g. "Zivid One" to "zividOne". --- source/camera/advanced/capture_hdr_loop.py | 4 ++-- source/camera/basic/capture_with_settings_from_yml.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/camera/advanced/capture_hdr_loop.py b/source/camera/advanced/capture_hdr_loop.py index ea899553..56c444bc 100644 --- a/source/camera/advanced/capture_hdr_loop.py +++ b/source/camera/advanced/capture_hdr_loop.py @@ -18,9 +18,9 @@ def _main(): camera = app.connect_camera() for i in range(1, 4): - camera_model = camera.info.model_name + camera_model = camera.info.model settings_file = ( - Path() / get_sample_data_path() / Path("Settings/" + camera_model[0:9] + f"/Settings0{i :01d}.yml") + Path() / get_sample_data_path() / Path("Settings/" + camera_model[0:8] + f"/Settings0{i :01d}.yml") ) print(f"Configuring settings from file: {settings_file}") settings = zivid.Settings.load(settings_file) diff --git a/source/camera/basic/capture_with_settings_from_yml.py b/source/camera/basic/capture_with_settings_from_yml.py index 70f74b72..e386850b 100644 --- a/source/camera/basic/capture_with_settings_from_yml.py +++ b/source/camera/basic/capture_with_settings_from_yml.py @@ -18,8 +18,8 @@ def _main(): print("Creating settings from file") - camera_model = camera.info.model_name - settings_file = Path() / get_sample_data_path() / Path("Settings/" + camera_model[0:9] + "/Settings01.yml") + camera_model = camera.info.model + settings_file = Path() / get_sample_data_path() / Path("Settings/" + camera_model[0:8] + "/Settings01.yml") print(f"Configuring settings from file: {settings_file}") settings = zivid.Settings.load(settings_file)