before restart
This commit is contained in:
@@ -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;
|
||||||
import static org.firstinspires.ftc.teamcode.constants.Poses.y2_b;
|
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.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.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
@@ -94,7 +94,7 @@ public class Blue extends LinearOpMode {
|
|||||||
|
|
||||||
Intake intake = new Intake(robot);
|
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()) {
|
while(opModeInInit()) {
|
||||||
|
|
||||||
|
if (gamepad2.dpadUpWasPressed()){
|
||||||
|
hoodDefault -= 0.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad2.dpadDownWasPressed()){
|
||||||
|
hoodDefault += 0.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
robot.hood.setPosition(hoodDefault);
|
||||||
|
|
||||||
shooter.setTurretPosition(0.33);
|
shooter.setTurretPosition(0.33);
|
||||||
|
|
||||||
aprilTag.initTelemetry();
|
aprilTag.initTelemetry();
|
||||||
@@ -148,7 +158,7 @@ public class Blue extends LinearOpMode {
|
|||||||
|
|
||||||
if (opModeIsActive()){
|
if (opModeIsActive()){
|
||||||
|
|
||||||
robot.hood.setPosition(0.54);
|
robot.hood.setPosition(hoodDefault);
|
||||||
|
|
||||||
transfer.setTransferPower(1);
|
transfer.setTransferPower(1);
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import org.firstinspires.ftc.teamcode.subsystems.Shooter;
|
|||||||
import org.firstinspires.ftc.teamcode.subsystems.Spindexer;
|
import org.firstinspires.ftc.teamcode.subsystems.Spindexer;
|
||||||
import org.firstinspires.ftc.teamcode.subsystems.Transfer;
|
import org.firstinspires.ftc.teamcode.subsystems.Transfer;
|
||||||
import org.firstinspires.ftc.teamcode.utils.Robot;
|
import org.firstinspires.ftc.teamcode.utils.Robot;
|
||||||
|
import static org.firstinspires.ftc.teamcode.constants.ServoPositions.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Config
|
@Config
|
||||||
@@ -80,7 +82,7 @@ public class Red extends LinearOpMode {
|
|||||||
|
|
||||||
shooter.setShooterMode("MANUAL");
|
shooter.setShooterMode("MANUAL");
|
||||||
|
|
||||||
shooter.sethoodPosition(0.53);
|
shooter.sethoodPosition(hoodDefault);
|
||||||
|
|
||||||
transfer = new Transfer(robot);
|
transfer = new Transfer(robot);
|
||||||
|
|
||||||
@@ -88,7 +90,7 @@ public class Red extends LinearOpMode {
|
|||||||
|
|
||||||
Intake intake = new Intake(robot);
|
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()) {
|
while(opModeInInit()) {
|
||||||
|
|
||||||
|
if (gamepad2.dpadUpWasPressed()){
|
||||||
|
hoodDefault -= 0.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gamepad2.dpadDownWasPressed()){
|
||||||
|
hoodDefault += 0.02;
|
||||||
|
}
|
||||||
|
|
||||||
|
robot.hood.setPosition(hoodDefault);
|
||||||
|
|
||||||
shooter.setTurretPosition(0.33);
|
shooter.setTurretPosition(0.33);
|
||||||
|
|
||||||
aprilTag.initTelemetry();
|
aprilTag.initTelemetry();
|
||||||
@@ -142,7 +154,7 @@ public class Red extends LinearOpMode {
|
|||||||
|
|
||||||
if (opModeIsActive()){
|
if (opModeIsActive()){
|
||||||
|
|
||||||
robot.hood.setPosition(0.54);
|
robot.hood.setPosition(hoodDefault);
|
||||||
|
|
||||||
transfer.setTransferPower(1);
|
transfer.setTransferPower(1);
|
||||||
|
|
||||||
|
|||||||
@@ -17,5 +17,7 @@ public class ServoPositions {
|
|||||||
|
|
||||||
public static double transferServo_in = 0.4;
|
public static double transferServo_in = 0.4;
|
||||||
|
|
||||||
|
public static double hoodDefault = 0.54;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,14 +122,24 @@ public class Spindexer implements Subsystem{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void intakeShake(double runtime) {
|
public void intakeShake(double runtime) {
|
||||||
if ((runtime % 0.33) >0.167) {
|
if ((runtime % 0.25) >0.125) {
|
||||||
position = spindexer_intakePos + 0.02;
|
position = spindexer_intakePos + 0.04;
|
||||||
} else {
|
} 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 () {
|
public void outtake3 () {
|
||||||
position = spindexer_outtakeBall3;
|
position = spindexer_outtakeBall3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.firstinspires.ftc.teamcode.teleop;
|
package org.firstinspires.ftc.teamcode.teleop;
|
||||||
|
|
||||||
import static org.firstinspires.ftc.teamcode.constants.Poses.teleStart;
|
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.FtcDashboard;
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
@@ -49,7 +50,7 @@ public class TeleopV1 extends LinearOpMode {
|
|||||||
|
|
||||||
public static double power = 0.0;
|
public static double power = 0.0;
|
||||||
|
|
||||||
public static double pos = 0.54;
|
public static double pos = hoodDefault;
|
||||||
|
|
||||||
public boolean all = false;
|
public boolean all = false;
|
||||||
|
|
||||||
@@ -240,6 +241,10 @@ public class TeleopV1 extends LinearOpMode {
|
|||||||
if (g1LeftBumper.wasJustPressed()){
|
if (g1LeftBumper.wasJustPressed()){
|
||||||
g2LeftBumperStamp = getRuntime();
|
g2LeftBumperStamp = getRuntime();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
spindexer.intakeShake(getRuntime());
|
||||||
|
|
||||||
leftBumper = true;
|
leftBumper = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user