Hiding puck detection errors from users.

This commit is contained in:
gac-S_Changer
2018-09-19 17:56:09 +02:00
parent afb1e4cac2
commit dc78eb382f
3 changed files with 6 additions and 8 deletions

View File

@@ -220,7 +220,7 @@ public class Controller {
void onTimer() {
try {
setPuckLoading(Controller.getInstance().isPuckLoading());
setPuckLoading(isPuckLoading());
} catch (Exception ex) {
setPuckLoading(false);
}

View File

@@ -45,8 +45,6 @@ public class MainPanel extends Panel {
*/
Boolean manualMode;
Boolean roomTemperature;
Boolean puckLoading;
public final String PUCK_LOADING_STATUS = "Puck loading";
public MainPanel() {
@@ -92,7 +90,7 @@ public class MainPanel extends Panel {
if (e.getValueIsAdjusting() == false) {
int selection = tableSamples.getSelectedRow();
if (selection>=0){
String add = String.valueOf(tableSamples.getModel().getValueAt(selection, 3));
String add = String.valueOf(tableSamples.getModel().getValueAt(selection, 5));
if (!add.trim().isEmpty()) {
int pos = -1;
try{
@@ -226,7 +224,7 @@ public class MainPanel extends Panel {
}
Controller.getInstance().onTimer();
if (getState() == State.Ready) {
if (Boolean.TRUE.equals(puckLoading)) {
if (Boolean.TRUE.equals(Controller.getInstance().puckLoading)) {
getView().getStatusBar().setStatusMessage(PUCK_LOADING_STATUS);
} else {
if (PUCK_LOADING_STATUS.equals(getView().getStatusBar().getStatusLabel().getText())) {
@@ -471,7 +469,7 @@ public class MainPanel extends Panel {
sampleData,
new String[]{
"User Name", "Dewar Name",
"Puck Name", "Puck Address", "Puck Barcode", "Puck Type",
"Puck Name", "Puck Type", "Puck Id", "Puck Address",
"Sample Name", "Sample Position", "Sample Status", "Mount Count"
}
) {
@@ -496,7 +494,7 @@ public class MainPanel extends Panel {
}
for (int i = 0; i < tableSamples.getModel().getRowCount(); i++) {
if (add.equals(tableSamples.getModel().getValueAt(i, 3))) {
if (add.equals(tableSamples.getModel().getValueAt(i, 5))) {
if (sample!=null){
if (!sample.equals(tableSamples.getModel().getValueAt(i, 7))){
continue;

View File

@@ -22,7 +22,7 @@ public class SampleInfo extends HashMap {
Object[] getData() {
return new Object[]{getStr("userName"), getStr("dewarName"),
getStr("puckName"), getStr("puckAddress"), getStr("puckBarcode"), getEnum("puckType", PuckType.class, PuckType.Unknown),
getStr("puckName"), getEnum("puckType", PuckType.class, PuckType.Unknown), getStr("puckBarcode"), getStr("puckAddress"),
getStr("sampleName"), getInt("samplePosition"), getEnum("sampleStatus", SampleStatus.class, SampleStatus.Unknown), getInt("sampleMountCount")
};