From 6743481440d8cddf323b8018305519effeb9acfb Mon Sep 17 00:00:00 2001 From: DanTheMan-byte Date: Sat, 28 Feb 2026 11:31:32 -0600 Subject: [PATCH] added control to spindexer speed --- .../ftc/teamcode/constants/ServoPositions.java | 2 +- .../ftc/teamcode/teleop/TeleopV3.java | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/constants/ServoPositions.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/constants/ServoPositions.java index 465d608..b1e9eb1 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/constants/ServoPositions.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/constants/ServoPositions.java @@ -19,7 +19,7 @@ public class ServoPositions { public static double spinStartPos = 0.05; public static double spinEndPos = 0.95; - public static double shootAllSpindexerSpeedIncrease = 0.008; + public static double shootAllSpindexerSpeedIncrease = 0.009; public static double transferServo_out = 0.15; diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/teleop/TeleopV3.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/teleop/TeleopV3.java index a519e0a..a92bc8b 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/teleop/TeleopV3.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/teleop/TeleopV3.java @@ -2,6 +2,7 @@ package org.firstinspires.ftc.teamcode.teleop; import static org.firstinspires.ftc.teamcode.constants.Color.redAlliance; import static org.firstinspires.ftc.teamcode.constants.Front_Poses.teleStart; +import static org.firstinspires.ftc.teamcode.constants.ServoPositions.shootAllSpindexerSpeedIncrease; import static org.firstinspires.ftc.teamcode.constants.ServoPositions.transferServo_out; import static org.firstinspires.ftc.teamcode.utils.Targeting.turretInterpolate; import static org.firstinspires.ftc.teamcode.utils.Turret.limelightUsed; @@ -16,6 +17,7 @@ import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import org.firstinspires.ftc.teamcode.constants.Color; +import org.firstinspires.ftc.teamcode.constants.ServoPositions; import org.firstinspires.ftc.teamcode.constants.StateEnums; import org.firstinspires.ftc.teamcode.libs.RR.MecanumDrive; import org.firstinspires.ftc.teamcode.utils.Drivetrain; @@ -157,10 +159,11 @@ public class TeleopV3 extends LinearOpMode { light.setState(StateEnums.LightState.BALL_COUNT); - } else if (gamepad2.triangle){ + //} else if (gamepad2.triangle){ //light.setState(StateEnums.LightState.BALL_COLOR); - } else { + //} + } else { light.setState(StateEnums.LightState.BALL_COUNT); } @@ -188,7 +191,7 @@ public class TeleopV3 extends LinearOpMode { //RELOCALIZATION - if (gamepad2.squareWasPressed()){ + if (gamepad2.triangleWasPressed()){ relocalize = !relocalize; gamepad2.rumble(500); } @@ -197,7 +200,7 @@ public class TeleopV3 extends LinearOpMode { turret.relocalize(); xOffset = -((turret.getLimelightZ() * 39.3701) + Turret.limelightPosOffset) - robX; yOffset = (turret.getLimelightX() * 39.3701) - robY; - hOffset = (Math.toRadians(turret.getLimelightH())) - robH; + //hOffset = (Math.toRadians(turret.getLimelightH())) - robH; } else { turret.trackGoal(deltaPose); } @@ -265,8 +268,15 @@ public class TeleopV3 extends LinearOpMode { if (gamepad2.crossWasPressed()) { drive = new MecanumDrive(hardwareMap, new Pose2d(0, 0, 0)); + gamepad2.rumble(200); + sleep(500); } + if (gamepad2.squareWasPressed()){ + shootAllSpindexerSpeedIncrease = shootAllSpindexerSpeedIncrease-0.01; + } else if (gamepad2.circleWasPressed()){ + shootAllSpindexerSpeedIncrease = shootAllSpindexerSpeedIncrease+0.01; + } if (enableSpindexerManager) {