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 701dca8..d75f544 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java @@ -882,6 +882,11 @@ private boolean doHardwareCalculations(PLogicSCAPE plc) { } } + // set imaging camera exposure + final CameraBase cam = model_.devices() + .getDevice("ImagingCamera"); + cam.setExposure(exposureTime); + double extraChannelOffset = 0.0; plc.prepareControllerForAcquisition(acqSettings_, extraChannelOffset); return true; diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/devices/cameras/CameraBase.java b/src/main/java/org/micromanager/lightsheetmanager/model/devices/cameras/CameraBase.java index c384fd0..5be8c5e 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/devices/cameras/CameraBase.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/devices/cameras/CameraBase.java @@ -21,6 +21,24 @@ public CameraBase(final Studio studio, final String deviceName) { mode_ = CameraMode.EDGE; } + public void setExposure(final double milliseconds) { + try { + core_.setExposure(deviceName_, milliseconds); + } catch (Exception e) { + studio_.logs().logError("could not set camera exposure"); + } + } + + public double getExposure() { + double exposure = 0.0; + try { + exposure = core_.getExposure(); + } catch (Exception e) { + studio_.logs().logError("could not get camera exposure"); + } + return exposure; + } + // TODO: take binning into account public Rectangle getROI() { Rectangle roi = new Rectangle();