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 d75f544..db85270 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java @@ -99,6 +99,12 @@ boolean run() { } } + // save current exposure to restore later + CameraBase cam = model_.devices() + .getDevice("ImagingCamera"); + final double origExposure = cam.getExposure(); + + // used to detect if the plugin is using ASI hardware final boolean isUsingPLC = model_.devices().isUsingPLogic(); // initialize stage scanning so we can restore state @@ -674,6 +680,7 @@ public void close() { // set the camera trigger mode back to internal for live mode CameraBase camera = model_.devices().getDevice("ImagingCamera"); camera.setTriggerMode(CameraMode.INTERNAL); + camera.setExposure(origExposure); currentAcquisition_ = null; @@ -886,7 +893,7 @@ private boolean doHardwareCalculations(PLogicSCAPE plc) { final CameraBase cam = model_.devices() .getDevice("ImagingCamera"); cam.setExposure(exposureTime); - + double extraChannelOffset = 0.0; plc.prepareControllerForAcquisition(acqSettings_, extraChannelOffset); return true;