This commit is contained in:
@@ -26,10 +26,12 @@ import javax.swing.border.TitledBorder;
|
||||
public class MainPanel extends Panel {
|
||||
/** Creates new form Panel */
|
||||
|
||||
public MainPanel() {
|
||||
public MainPanel() {
|
||||
initComponents();
|
||||
getContext().getPluginManager().addDynamicClass(PuckDetection.class);
|
||||
Controller.createInstance(this);
|
||||
basePlatePanel.setMode(BasePlatePanel.Mode.single);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class PuckDetection extends DeviceBase {
|
||||
public PuckDetection(String name, String server) {
|
||||
super(name);
|
||||
this.server = server.startsWith("tcp://") ? server : "tcp://" + server;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDebug() {
|
||||
return debug;
|
||||
@@ -74,19 +74,19 @@ public class PuckDetection extends DeviceBase {
|
||||
void subscriberTask() {
|
||||
try {
|
||||
setState(State.Ready);
|
||||
if (isSimulated()) {
|
||||
if (isSimulated()) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
for (int address = 1; address <= Controller.NUMBER_OF_PUCKS; address++) {
|
||||
Integer indDetector = ((address <= 6) || (address==30)) ? 1 : 0;
|
||||
Integer mecDetector = ((address <= 6) || (address==29)) ? 1 : 0;
|
||||
int index = Controller.getInstance().getPuckIndex(address);
|
||||
PuckState puck = Controller.getInstance().getPuckState(index);
|
||||
puck.set(mecDetector, indDetector);
|
||||
}
|
||||
if (Controller.getInstance() != null) {
|
||||
Controller.getInstance().updateView();
|
||||
}
|
||||
chrono = new Chrono();
|
||||
for (int address = 1; address <= Controller.NUMBER_OF_PUCKS; address++) {
|
||||
Integer indDetector = ((address <= 6) || (address==30)) ? 1 : 0;
|
||||
Integer mecDetector = ((address <= 6) || (address==29)) ? 1 : 0;
|
||||
int index = Controller.getInstance().getPuckIndex(address);
|
||||
PuckState puck = Controller.getInstance().getPuckState(index);
|
||||
puck.set(mecDetector, indDetector);
|
||||
}
|
||||
if (Controller.getInstance() != null) {
|
||||
Controller.getInstance().updateView();
|
||||
}
|
||||
chrono = new Chrono();
|
||||
Thread.sleep(2000);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user