Skip to content

Commit

Permalink
save and restore exposure
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon committed May 3, 2024
1 parent d5edd95 commit 0f4c649
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0f4c649

Please sign in to comment.