From 3548ea253772eea3ea65fdbd73f784b93c260678 Mon Sep 17 00:00:00 2001 From: Brandon Date: Mon, 16 Feb 2026 18:30:34 -0800 Subject: [PATCH] make setCameraDevice more generic, easier to swap between modes --- .../acquisitions/AcquisitionEngineSCAPE.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java index 9edaab1..a473446 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java @@ -92,15 +92,15 @@ boolean setup() { studio_.logs().showError("The primary camera MUST be active in simultaneous cameras mode!"); return false; } - // set the core camera device to the primary camera - if (cameras.length > 1) { - try { - core_.setCameraDevice(cameras[0].name()); - } catch (Exception e) { - studio_.logs().showError("Could not set \"Core-Camera\" for simultaneous cameras."); - return false; - } - } + } + + // set the "Core-Camera" property to the first logical camera device + final String cameraName = model_.devices().firstImagingCamera().getDeviceName(); + try { + core_.setCameraDevice(cameraName); + } catch (Exception e) { + studio_.logs().showError("Could not set \"Core-Camera\" to the first logical camera device."); + return false; } // this is needed for LSMAcquisitionEvents to work with multiple positions