fixed pot conversion code
This commit is contained in:
parent
fe6dce9640
commit
18ff5daaad
Binary file not shown.
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user