changes to PID

This commit is contained in:
DanTheMan-byte
2025-11-28 19:21:54 -06:00
parent b0bc7b7b5b
commit 4bbe5f218c

View File

@@ -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 {