Autoformatted
This commit is contained in:
parent
b9b0ee6628
commit
3128d3e31b
@ -11,7 +11,6 @@ public class MainArm extends PIDSubsystem {
|
||||
AnalogInput pot = new AnalogInput(RobotMap.armPot);
|
||||
DigitalInput limitSwitchBottom = new DigitalInput(RobotMap.armBottomLim);
|
||||
DigitalInput limitSwitchTop = new DigitalInput(RobotMap.armTopLim);
|
||||
|
||||
public MainArm() {
|
||||
super("MainArm", 0.06, 0.0, 0.002);
|
||||
getPIDController().setContinuous(false);
|
||||
@ -45,13 +44,11 @@ public class MainArm extends PIDSubsystem {
|
||||
} else if (!limitSwitchTop.get()) {
|
||||
RobotMap.ninetyDegrees = getRaw();
|
||||
System.out.println("====Top Switch====\n" + getRaw());
|
||||
|
||||
}
|
||||
double min = RobotMap.zeroDegrees;
|
||||
double max = RobotMap.ninetyDegrees;
|
||||
System.out.println((pot - min) / (Math.abs(min - max) / 90));
|
||||
return (pot - min) / (Math.abs(min - max) / 90);
|
||||
}
|
||||
|
||||
}
|
||||
// vim: sw=2:ts=2:sts=2
|
||||
|
Loading…
Reference in New Issue
Block a user