limit switch moves arm up

This commit is contained in:
ian 2016-09-16 20:52:06 -04:00
parent 16db69d087
commit b9b0ee6628

View File

@ -38,10 +38,11 @@ public class MainArm extends PIDSubsystem {
return potToDegrees(getRaw()); return potToDegrees(getRaw());
} }
private double potToDegrees(double pot) { private double potToDegrees(double pot) {
if (limitSwitchBottom.get()){ System.out.println(limitSwitchBottom.get());
if (!limitSwitchBottom.get()){
RobotMap.zeroDegrees = getRaw(); RobotMap.zeroDegrees = getRaw();
System.out.println("====Bottom Switch====\n" + getRaw()); System.out.println("====Bottom Switch====\n" + getRaw());
} else if (limitSwitchTop.get()){ } else if (!limitSwitchTop.get()){
RobotMap.ninetyDegrees = getRaw(); RobotMap.ninetyDegrees = getRaw();
System.out.println("====Top Switch====\n" + getRaw()); System.out.println("====Top Switch====\n" + getRaw());