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){ private double potToDegrees(double pot){
double min = RobotMap.zeroDegrees; double min = RobotMap.zeroDegrees;
double max = RobotMap.ninetyDegrees; double max = RobotMap.ninetyDegrees;
double tmp = pot - max; System.out.println((pot-min)/(Math.abs(min-max)/90));
min = min - max; return (pot-min)/(Math.abs(min-max)/90);
max = max - max;
return 300 - ((tmp + max) / (300/min));
} }
} }
// vim: sw=2:ts=2:sts=2 // vim: sw=2:ts=2:sts=2