MainPanel prototype
This commit is contained in:
@@ -34,15 +34,16 @@ public class PuckState {
|
||||
}
|
||||
}
|
||||
|
||||
void set(boolean mecSwitch, boolean indSwitch) {
|
||||
void set(int mecSwitch, int indSwitch) {
|
||||
online = true;
|
||||
this.mecSwitch = mecSwitch;
|
||||
this.indSwitch = indSwitch;
|
||||
//TODO: Hanfle -1 value: error
|
||||
this.mecSwitch = mecSwitch ==1;
|
||||
this.indSwitch = mecSwitch ==1;
|
||||
BasePlate basePlate = getBasePlate();
|
||||
if (basePlate != null) {
|
||||
if (mecSwitch != indSwitch) {
|
||||
if (this.mecSwitch != this.indSwitch) {
|
||||
basePlate.getPucks()[id - 1].detection = Puck.Detection.Error;
|
||||
} else if (mecSwitch) {
|
||||
} else if (this.mecSwitch) {
|
||||
basePlate.getPucks()[id - 1].detection = Puck.Detection.Present;
|
||||
} else {
|
||||
basePlate.getPucks()[id - 1].detection = Puck.Detection.Empty;
|
||||
|
||||
Reference in New Issue
Block a user