diff --git a/src/main/java/org/micromanager/lightsheetmanager/gui/tabs/navigation/NavigationPanel.java b/src/main/java/org/micromanager/lightsheetmanager/gui/tabs/navigation/NavigationPanel.java index 70c755a..491dcc4 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/gui/tabs/navigation/NavigationPanel.java +++ b/src/main/java/org/micromanager/lightsheetmanager/gui/tabs/navigation/NavigationPanel.java @@ -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; @@ -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(); @@ -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()); }); } @@ -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(); } @@ -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(); diff --git a/src/main/java/org/micromanager/lightsheetmanager/model/DeviceManager.java b/src/main/java/org/micromanager/lightsheetmanager/model/DeviceManager.java index 2139efb..add3c3f 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/DeviceManager.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/DeviceManager.java @@ -45,7 +45,7 @@ public class DeviceManager { private Map deviceMap_; private Map devicesAdded_; - private LightSheetManagerModel model_; + private final LightSheetManagerModel model_; private static String deviceAdapterName_; public static final String LSM_DEVICE_LIBRARY = "LightSheetManager"; 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 c342e69..855dd03 100644 --- a/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java +++ b/src/main/java/org/micromanager/lightsheetmanager/model/acquisitions/AcquisitionEngineSCAPE.java @@ -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