limit switch moves arm up
This commit is contained in:
parent
16db69d087
commit
b9b0ee6628
@ -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());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user