Skip to content

Commit

Permalink
Merge pull request #290 from bls337/main
Browse files Browse the repository at this point in the history
minor update
  • Loading branch information
bls337 authored May 15, 2024
2 parents 0cb2bd4 + 1a4a818 commit d9f25e7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.micromanager.Studio;
import org.micromanager.lightsheetmanager.model.LightSheetManagerModel;

import javax.swing.*;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;
import java.util.ArrayList;
import java.util.Comparator;
Expand Down Expand Up @@ -229,7 +229,7 @@ public void createUserInterface() {
private void createEventHandlers() {

btnRefreshPanel_.registerListener(e -> {
System.out.println("refresh pressed");
//System.out.println("refresh pressed");
removeAll();
createUserInterface();
createEventHandlers();
Expand All @@ -248,7 +248,7 @@ private void createEventHandlers() {
} else {
positionUpdater_.stopPolling();
}
System.out.println("poll positions isSelected: " + cbxPollPositions_.isSelected());
//System.out.println("poll positions isSelected: " + cbxPollPositions_.isSelected());
});

}
Expand All @@ -274,7 +274,6 @@ private boolean containsDigit(final String str) {
*/
public void updatePositions() {
//System.out.println("isEDT: " + SwingUtilities.isEventDispatchThread());
//System.out.println("updating!");
for (ControlPanel panel : controlPanels_) {
panel.updatePosition();
}
Expand All @@ -296,10 +295,11 @@ public PositionUpdater getPositionUpdater() {
return positionUpdater_;
}

public void haltAllDevices() {
//System.out.println("Halt pressed!");
/**
* Halt all 2D and 1D stage devices.
*/
private void haltAllDevices() {
for (ControlPanel controlPanel : controlPanels_) {
// only try to stop XY and 1D stages
DeviceType deviceType = controlPanel.getDeviceType();
if (deviceType == DeviceType.XYStageDevice || deviceType == DeviceType.StageDevice) {
controlPanel.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class DeviceManager {
private Map<String, DeviceBase> deviceMap_;
private Map<String, DeviceBase> devicesAdded_;

private LightSheetManagerModel model_;
private final LightSheetManagerModel model_;

private static String deviceAdapterName_;
public static final String LSM_DEVICE_LIBRARY = "LightSheetManager";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,19 @@ public AcquisitionEngineSCAPE(final LightSheetManagerModel model) {
@Override
boolean setup() {

// // check pixel size
// if (core_.getPixelSizeUm() < 1e-6) {
// studio_.logs().showError(
// "Pixel size not set, navigate to \"Devices > Pixel Size Calibration...\" to set the value.");
// return false;
// }

// this is needed for LSMAcquisitionEvents to work with multiple positions
if (core_.getFocusDevice().isEmpty()
&& acqSettings_.isUsingMultiplePositions()) {
studio_.logs().showError("The default focus device \"Core-Focus\" needs to be set to use multiple positions.");
studio_.logs().showError(
"The default focus device \"Core-Focus\" needs to be set to use multiple positions.");
return false;
}

// make sure that there are positions in the PositionList
Expand Down

0 comments on commit d9f25e7

Please sign in to comment.