Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove many print statements; replace some with logs #289

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ private Builder(final SliceCalibration sliceCalibration) {
@Override
public SliceCalibration.Builder sliceSlope(final double slope) {
sliceSlope_ = slope;
System.out.println(sliceSlope_);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public void removeSelectedAcquisition() {
table_.clearSelection();
}
table_.repaint();
System.out.println("remove acquisition: " + name);
//System.out.println("remove acquisition: " + name);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ private void removeSelectedPositionList() {
}
lstPositions_.removeItem(name); // remove name from JList
acqTable_.removePositionList(name);
System.out.println("remove: " + name);
//System.out.println("remove: " + name);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ public void valueChanged(ListSelectionEvent event) {
public boolean validatePositionsSize() {
final int positionsSize = table_.getTableData().getPositionsSize();
if (positionsSize != model_.size()) {
System.out.println("Validate Error: The number of items in the AcquisitionTablePositionList "
+ "should be the same as the number of keys in AcquisitionTableData positions field.");
//System.out.println("Validate Error: The number of items in the AcquisitionTablePositionList "
// + "should be the same as the number of keys in AcquisitionTableData positions field.");
return false;
} else {
System.out.println("Validate Success: The number of positions are the same.");
//System.out.println("Validate Success: The number of positions are the same.");
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ private void createEventHandlers() {

// general autofocus settings
cbxShowImages_.registerListener(e -> {
System.out.println("cbxShowImages_: " + cbxShowImages_.isSelected());
//System.out.println("cbxShowImages_: " + cbxShowImages_.isSelected());
});

cbxShowPlot_.registerListener(e -> {
System.out.println("cbxShowPlot_: " + cbxShowPlot_.isSelected());
//System.out.println("cbxShowPlot_: " + cbxShowPlot_.isSelected());
});

spnNumImages_.registerListener(e ->
Expand Down Expand Up @@ -232,12 +232,15 @@ private void createEventHandlers() {
});

// autofocus options during acquisition
cbxAutofocusEveryPass_.registerListener(e ->
System.out.println("cbxAutofocusEveryPass_: " + cbxAutofocusEveryPass_.isSelected()));
cbxAutofocusBeforeAcq_.registerListener(e ->
System.out.println("cbxAutofocusBeforeAcq_: " + cbxAutofocusBeforeAcq_.isSelected()));
cmbAutofocusChannel_.registerListener(e ->
System.out.println("cmbAutofocusChannel_"));
cbxAutofocusEveryPass_.registerListener(e -> {
//System.out.println("cbxAutofocusEveryPass_: " + cbxAutofocusEveryPass_.isSelected());
});
cbxAutofocusBeforeAcq_.registerListener(e -> {
//System.out.println("cbxAutofocusBeforeAcq_: " + cbxAutofocusBeforeAcq_.isSelected());
});
cmbAutofocusChannel_.registerListener(e -> {
//System.out.println("cmbAutofocusChannel_");
});

spnAutofocusEveryX_.registerListener(e -> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void createEventHandlers() {

radSaveMode_.registerListener(e -> {
model_.acquisitions().settingsBuilder().saveMode(DataStorage.SaveMode.fromString(radSaveMode_.getSelectedButtonText()));
System.out.println("radSaveMode: " + radSaveMode_.getSelectedButtonText());
//System.out.println("radSaveMode: " + radSaveMode_.getSelectedButtonText());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private void createEventHandlers() {
table_.refreshData();
// table_.repaint();
// repaint();
System.out.println("add channel");
//System.out.println("add channel");
table_.getData().printChannelData();
final ChannelSpec[] channels = table_.getData().getChannels();
model_.acquisitions().settingsBuilder().channels(channels);
Expand All @@ -93,7 +93,7 @@ private void createEventHandlers() {
model_.acquisitions().settingsBuilder().channels(channels);
model_.acquisitions().settingsBuilder().numChannels(channels.length);
table_.refreshData();
System.out.println("remove row index: " + row);
//System.out.println("remove row index: " + row);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private double getPosition() {

private void setOriginY() {
try {
System.out.println("deviceName_: " + deviceName_);
//System.out.println("deviceName_: " + deviceName_);
core_.setOriginY(deviceName_);
} catch (Exception e) {
studio_.logs().showError("failed to set y origin!");
Expand All @@ -336,7 +336,7 @@ private void setOriginY() {

private void setOriginX() {
try {
System.out.println("deviceName_: " + deviceName_);
//System.out.println("deviceName_: " + deviceName_);
core_.setOriginX(deviceName_);
} catch (Exception e) {
studio_.logs().showError("failed to set x origin!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void createUserInterface() {
illumProperties.add(new ArrayList<>());
}

System.out.println("img props: " + imagingProperties.size());
System.out.println("ill props: " + illumProperties.size());
//System.out.println("img props: " + imagingProperties.size());
//System.out.println("ill props: " + illumProperties.size());

int devicesFound = 0;
for (String propertyName : deviceMap.keySet()) {
Expand All @@ -92,7 +92,7 @@ public void createUserInterface() {
}

// TODO: only add certain kinds of devices
System.out.println(propertyName);
//System.out.println(propertyName);
final DeviceType deviceType = deviceTypeMap.get(propertyName);
if (deviceType == DeviceType.CameraDevice) {
continue; // don't add cameras to axis list
Expand Down Expand Up @@ -220,8 +220,6 @@ public void createUserInterface() {
controlPanels_.add(controlPanel);
}

//createEventHandlers();

add(miscPanel, "wrap");
add(btnHaltDevices_, "split 3");
//add(btnRefreshPanel_, "");
Expand Down Expand Up @@ -299,7 +297,7 @@ public PositionUpdater getPositionUpdater() {
}

public void haltAllDevices() {
System.out.println("Halt pressed!");
//System.out.println("Halt pressed!");
for (ControlPanel controlPanel : controlPanels_) {
// only try to stop XY and 1D stages
DeviceType deviceType = controlPanel.getDeviceType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected Void doInBackground() {
e.printStackTrace();
}
if (!isPolling_.get()) {
System.out.println("break!");
//System.out.println("break!");
break;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private void createEventHandlers() {

// first panel
btnPlotProfile_.registerListener(e -> {
System.out.println("do something here...");
//System.out.println("do something here...");
});

// second panel
Expand All @@ -177,7 +177,7 @@ private void createEventHandlers() {
final double value = sldSheetWidth_.getDouble();
model_.acquisitions().settingsBuilder()
.sheetCalibrationBuilder(pathNum_).sheetWidth(value);
System.out.println("sheetWidth value: " + value);
//System.out.println("sheetWidth value: " + value);
});

sldSheetOffset_.registerListener(e -> {
Expand All @@ -187,7 +187,7 @@ private void createEventHandlers() {
final String strValue = String.format("%.3f ", value);
txtSheetOffset_.setText(strValue);
lblSlopeOffset_.setText(strValue);
System.out.println("sheetOffset value: " + strValue);
//System.out.println("sheetOffset value: " + strValue);
});

txtSheetOffset_.registerListener(e -> {
Expand All @@ -201,7 +201,7 @@ private void createEventHandlers() {
});

btnCenterOffset_.registerListener(e -> {
System.out.println("center offset pressed");
//System.out.println("center offset pressed");
model_.acquisitions().settingsBuilder()
.sheetCalibrationBuilder(pathNum_).sheetOffset(0.0);
txtSheetOffset_.setText("0");
Expand All @@ -215,7 +215,7 @@ private void createEventHandlers() {
// .sheetCalibration(pathNum_).sheetOffset() - 0.01;
currentOffset_ -= 0.01;
final double value = currentOffset_;
System.out.println("value: " + value);
//System.out.println("value: " + value);
model_.acquisitions().settingsBuilder()
.sheetCalibrationBuilder(pathNum_).sheetOffset(value);
txtSheetOffset_.setText(String.format("%.3f ", value));
Expand All @@ -227,7 +227,7 @@ private void createEventHandlers() {
// .sheetCalibration(pathNum_).sheetOffset() + 0.01;
currentOffset_ += 0.01;
final double value = currentOffset_;
System.out.println("value: " + value);
//System.out.println("value: " + value);
model_.acquisitions().settingsBuilder()
.sheetCalibrationBuilder(pathNum_).sheetOffset(value);
txtSheetOffset_.setText(String.format("%.3f ", value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void createEventHandlers() {

cbxBeamExc_.registerListener(e -> {
scanner.setBeamOn(cbxBeamExc_.isSelected());
System.out.println("set beam on: " + cbxBeamExc_.isSelected());
//System.out.println("set beam on: " + cbxBeamExc_.isSelected());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void setup() {
final DeviceType deviceType = getDeviceType(deviceName);
final String deviceLibrary = getDeviceLibrary(deviceName);

System.out.println(propertyName + " " + deviceType);
//System.out.println(propertyName + " " + deviceType);

// skip properties with no known DeviceType
if (deviceType == DeviceType.UnknownType) {
Expand Down Expand Up @@ -162,7 +162,7 @@ public void setup() {
}
//deviceMap_.put(propertyName, "");
}
System.out.println("----------------");
//System.out.println("----------------");

// we don't need this array anymore
devicesAdded_.clear();
Expand Down
Loading
Loading