Skip to content

Commit

Permalink
Merge pull request #281 from bls337/main
Browse files Browse the repository at this point in the history
setExposure in acq engine scape
  • Loading branch information
bls337 authored May 3, 2024
2 parents e51ea39 + b0e0a92 commit d5edd95
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d5edd95

Please sign in to comment.