Laser indicating loaded pucks
This commit is contained in:
@@ -92,9 +92,14 @@ public class PuckLoadingDialog extends JDialog {
|
||||
textScannedDatamatrix.setText((datamatrix == null) ? "" : datamatrix.trim());
|
||||
if ((datamatrix != null) && (!datamatrix.isEmpty())){
|
||||
setStatusLabel("Scanned puck " + datamatrix, 5000);
|
||||
makeVisible(datamatrix);
|
||||
Puck puck = Controller.getInstance().getFreePuck();
|
||||
Controller.getInstance().setLaserPos(puck.getName());
|
||||
makeVisible(datamatrix);
|
||||
String loadedPuck = Controller.getInstance().getPuckFromDatamatrix(datamatrix);
|
||||
if ((loadedPuck!=null) && !loadedPuck.isBlank()){
|
||||
Controller.getInstance().setLaserPos(loadedPuck);
|
||||
} else {
|
||||
Puck puck = Controller.getInstance().getFreePuck();
|
||||
Controller.getInstance().setLaserPos(puck.getName());
|
||||
}
|
||||
} else {
|
||||
setStatusLabel(null, -1);
|
||||
Controller.getInstance().setLaserPos((Puck)null);
|
||||
|
||||
Reference in New Issue
Block a user