Skip to content

Commit f4f502f

Browse files
committed
Support basler backend in trigger defaults
Previously the default trigger configuration was only applied for backend 'gentl' and always stored under the 'gentl' properties key. This change treats the backend name dynamically (accepting both 'gentl' and 'basler'), and stores the default trigger settings under the actual backend key in cam.properties. Also preserves behavior when cam.properties or the backend namespace is not a dict.
1 parent cda3b12 commit f4f502f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dlclivegui/gui/camera_config/camera_config_dialog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,16 +820,16 @@ def _on_active_camera_selected(self, row: int) -> None:
820820

821821
def _ensure_default_trigger_config(self, cam: CameraSettings) -> None:
822822
backend = (cam.backend or "").lower()
823-
if backend != "gentl":
823+
if backend not in {"gentl", "basler"}:
824824
return
825825

826826
if not isinstance(cam.properties, dict):
827827
cam.properties = {}
828828

829-
ns = cam.properties.setdefault("gentl", {})
829+
ns = cam.properties.setdefault(backend, {})
830830
if not isinstance(ns, dict):
831831
ns = {}
832-
cam.properties["gentl"] = ns
832+
cam.properties[backend] = ns
833833

834834
ns.setdefault("trigger", CameraTriggerSettings().model_dump(exclude_none=True))
835835

0 commit comments

Comments
 (0)