before restart

This commit is contained in:
2025-11-08 09:45:44 -06:00
parent dc432f7686
commit 0df43db6f0
5 changed files with 49 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ import static org.firstinspires.ftc.teamcode.constants.Poses.y1;
import static org.firstinspires.ftc.teamcode.constants.Poses.y2;
import static org.firstinspires.ftc.teamcode.constants.Poses.y2_b;
import static org.firstinspires.ftc.teamcode.constants.Poses.y3;
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.transferServo_out;
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.*;
import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.Config;
@@ -94,7 +94,7 @@ public class Blue extends LinearOpMode {
Intake intake = new Intake(robot);
robot.hood.setPosition(0.54);
robot.hood.setPosition(hoodDefault);
@@ -131,6 +131,16 @@ public class Blue extends LinearOpMode {
while(opModeInInit()) {
if (gamepad2.dpadUpWasPressed()){
hoodDefault -= 0.02;
}
if (gamepad2.dpadDownWasPressed()){
hoodDefault += 0.02;
}
robot.hood.setPosition(hoodDefault);
shooter.setTurretPosition(0.33);
aprilTag.initTelemetry();
@@ -148,7 +158,7 @@ public class Blue extends LinearOpMode {
if (opModeIsActive()){
robot.hood.setPosition(0.54);
robot.hood.setPosition(hoodDefault);
transfer.setTransferPower(1);

View File

@@ -27,6 +27,8 @@ import org.firstinspires.ftc.teamcode.subsystems.Shooter;
import org.firstinspires.ftc.teamcode.subsystems.Spindexer;
import org.firstinspires.ftc.teamcode.subsystems.Transfer;
import org.firstinspires.ftc.teamcode.utils.Robot;
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.*;
@Config
@@ -80,7 +82,7 @@ public class Red extends LinearOpMode {
shooter.setShooterMode("MANUAL");
shooter.sethoodPosition(0.53);
shooter.sethoodPosition(hoodDefault);
transfer = new Transfer(robot);
@@ -88,7 +90,7 @@ public class Red extends LinearOpMode {
Intake intake = new Intake(robot);
robot.hood.setPosition(0.54);
robot.hood.setPosition(hoodDefault);
@@ -125,6 +127,16 @@ public class Red extends LinearOpMode {
while(opModeInInit()) {
if (gamepad2.dpadUpWasPressed()){
hoodDefault -= 0.02;
}
if (gamepad2.dpadDownWasPressed()){
hoodDefault += 0.02;
}
robot.hood.setPosition(hoodDefault);
shooter.setTurretPosition(0.33);
aprilTag.initTelemetry();
@@ -142,7 +154,7 @@ public class Red extends LinearOpMode {
if (opModeIsActive()){
robot.hood.setPosition(0.54);
robot.hood.setPosition(hoodDefault);
transfer.setTransferPower(1);

View File

@@ -17,5 +17,7 @@ public class ServoPositions {
public static double transferServo_in = 0.4;
public static double hoodDefault = 0.54;
}

View File

@@ -122,14 +122,24 @@ public class Spindexer implements Subsystem{
}
public void intakeShake(double runtime) {
if ((runtime % 0.33) >0.167) {
position = spindexer_intakePos + 0.02;
if ((runtime % 0.25) >0.125) {
position = spindexer_intakePos + 0.04;
} else {
position = spindexer_intakePos - 0.02;
position = spindexer_intakePos - 0.04;
}
}
public void outtake3Shake(double runtime) {
if ((runtime % 0.25) >0.125) {
position = spindexer_outtakeBall3 + 0.04;
} else {
position = spindexer_outtakeBall3 - 0.04;
}
}
public void outtake3 () {
position = spindexer_outtakeBall3;
}

View File

@@ -1,6 +1,7 @@
package org.firstinspires.ftc.teamcode.teleop;
import static org.firstinspires.ftc.teamcode.constants.Poses.teleStart;
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.hoodDefault;
import com.acmerobotics.dashboard.FtcDashboard;
import com.acmerobotics.dashboard.config.Config;
@@ -49,7 +50,7 @@ public class TeleopV1 extends LinearOpMode {
public static double power = 0.0;
public static double pos = 0.54;
public static double pos = hoodDefault;
public boolean all = false;
@@ -240,6 +241,10 @@ public class TeleopV1 extends LinearOpMode {
if (g1LeftBumper.wasJustPressed()){
g2LeftBumperStamp = getRuntime();
spindexer.intakeShake(getRuntime());
leftBumper = true;
}