changes to PID
This commit is contained in:
@@ -44,6 +44,8 @@ public class ShooterTest extends LinearOpMode {
|
|||||||
|
|
||||||
public static boolean intake = true;
|
public static boolean intake = true;
|
||||||
|
|
||||||
|
public static int tolerance = 50;
|
||||||
|
|
||||||
public static double kP = 0.0005; // small proportional gain (tune this)
|
public static double kP = 0.0005; // small proportional gain (tune this)
|
||||||
public static double maxStep = 0.06; // prevents sudden jumps
|
public static double maxStep = 0.06; // prevents sudden jumps
|
||||||
|
|
||||||
@@ -120,6 +122,7 @@ public class ShooterTest extends LinearOpMode {
|
|||||||
powPID = Math.max(0, Math.min(1, powPID));
|
powPID = Math.max(0, Math.min(1, powPID));
|
||||||
shooter.setVelocity(powPID);
|
shooter.setVelocity(powPID);
|
||||||
|
|
||||||
|
|
||||||
if (shoot){
|
if (shoot){
|
||||||
robot.transferServo.setPosition(transferServo_in);
|
robot.transferServo.setPosition(transferServo_in);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user