Fixed bug reporting puck detection error

This commit is contained in:
gac-S_Changer
2019-07-02 13:36:46 +02:00
parent a72beda043
commit 65e6c47aa8

View File

@@ -63,16 +63,20 @@ public class PuckState {
case Mechanical:
if (this.mecSwitch ==SwitchState.On ) {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Present;
} else {
} else if (this.mecSwitch ==SwitchState.Off ) {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Empty;
} else {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Error;
}
break;
case Inductive:
if (this.indSwitch ==SwitchState.On ) {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Present;
} else {
} else if (this.indSwitch ==SwitchState.Off ) {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Empty;
} else {
basePlate.getPucks()[id - 1].detection = Puck.Detection.Error;
}
break;