copied changes from Mr. Kruger's commit
This commit is contained in:
@@ -114,7 +114,6 @@ public class TeleopV4 extends LinearOpMode {
|
||||
if (shooter.getState() == Shooter.ShooterState.MANUAL_FLYWHEEL_TRACK_TURR || shooter.getState() == Shooter.ShooterState.MANUAL){
|
||||
shooter.setFlywheelVelocity(2500);
|
||||
robot.setHoodPos(0.6);
|
||||
robot.setTransferPower(-0.8);
|
||||
}
|
||||
|
||||
shooter.update(robot.voltage.getVoltage());
|
||||
@@ -144,6 +143,7 @@ public class TeleopV4 extends LinearOpMode {
|
||||
|
||||
if (gamepad1.right_bumper && state != SpindexerTransferIntake.RapidMode.OPEN_GATE && state != SpindexerTransferIntake.RapidMode.SHOOT) {
|
||||
robot.setIntakePower(1);
|
||||
robot.setTransferPower(-0.7);
|
||||
}
|
||||
|
||||
if (gamepad2.leftBumperWasPressed()){
|
||||
|
||||
@@ -32,7 +32,7 @@ public class NewShooterTest extends LinearOpMode {
|
||||
public static int flywheelVelo = 0;
|
||||
public static double hoodPos = 0.5;
|
||||
public static double transferPower = -0.8;
|
||||
// public static double turretPos = 0.51;
|
||||
public static boolean overrideTransferPower = false;
|
||||
|
||||
@Override
|
||||
public void runOpMode() throws InterruptedException {
|
||||
@@ -84,15 +84,14 @@ public class NewShooterTest extends LinearOpMode {
|
||||
gamepad1.left_stick_x
|
||||
);
|
||||
|
||||
if (gamepad1.crossWasPressed()){
|
||||
if (Color.redAlliance){
|
||||
TeleopV4.relocalizePose = new Pose(56, 11, 0);
|
||||
TeleopV4.relocalizePose = new Pose(57.5, 5, 0);
|
||||
} else {
|
||||
TeleopV4.relocalizePose = new Pose(-56, 11, 180);
|
||||
TeleopV4.relocalizePose = new Pose(-57.5, 5, Math.toRadians(180));
|
||||
}
|
||||
follower.setPose(TeleopV4.relocalizePose);
|
||||
sleep(500);
|
||||
gamepad1.rumble(100);
|
||||
}
|
||||
|
||||
follower.update();
|
||||
|
||||
@@ -107,7 +106,6 @@ public class NewShooterTest extends LinearOpMode {
|
||||
if (shooter.getState() == Shooter.ShooterState.MANUAL_FLYWHEEL_TRACK_TURR || shooter.getState() == Shooter.ShooterState.MANUAL){
|
||||
shooter.setFlywheelVelocity(flywheelVelo);
|
||||
robot.setHoodPos(hoodPos);
|
||||
robot.setTransferPower(transferPower);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -366,9 +366,10 @@ public class SpindexerTransferIntake {
|
||||
case HOLD_BALLS:
|
||||
|
||||
if (robot.insideBeam.isPressed()
|
||||
&& robot.outsideBeam.isPressed() && holdBallsTicker > 5) {
|
||||
&& robot.outsideBeam.isPressed() && holdBallsTicker > 10) {
|
||||
|
||||
robot.setIntakePower(0.1);
|
||||
robot.setTransferPower(0);
|
||||
|
||||
} else {
|
||||
holdBallsTicker++;
|
||||
|
||||
@@ -20,12 +20,12 @@ public class Turret {
|
||||
private final double turretMin = 0.05;
|
||||
private final double turretMax = 0.95;
|
||||
public static boolean limelightUsed = true;
|
||||
public static double B_PID_P = 0.0003, B_PID_I = 0.0, B_PID_D = 0.00003;
|
||||
public static double B_PID_P = 0.00015, B_PID_I = 0.0, B_PID_D = 0.00001;
|
||||
LLResult result;
|
||||
PIDController bearingPID;
|
||||
boolean bearingAligned = false;
|
||||
public int LL_COAST_TICKS = 5;
|
||||
public static double TARGET_POSITION_TOLERANCE = 0.5;
|
||||
public static double TARGET_POSITION_TOLERANCE = 0.65;
|
||||
public static double alphaTX = 0.5;
|
||||
private double targetTx = 0;
|
||||
private double currentTrackOffset = 0;
|
||||
|
||||
Reference in New Issue
Block a user