fixed pot conversion code

This commit is contained in:
Adam Long 2016-09-12 14:15:10 -04:00
parent fe6dce9640
commit 18ff5daaad
2 changed files with 2 additions and 4 deletions

View File

@ -32,10 +32,8 @@ public class MainArm extends PIDSubsystem {
private double potToDegrees(double pot){
double min = RobotMap.zeroDegrees;
double max = RobotMap.ninetyDegrees;
double tmp = pot - max;
min = min - max;
max = max - max;
return 300 - ((tmp + max) / (300/min));
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