revert
This commit is contained in:
@@ -180,7 +180,7 @@ public class Auto_LT_Close extends LinearOpMode {
|
||||
|
||||
servos.setTransferPos(transferServo_out);
|
||||
limelightUsed = false;
|
||||
Spindexer.teleop = false;
|
||||
// Spindexer.teleop = false;
|
||||
|
||||
robot.light.setPosition(1);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public class Auto_LT_Far extends LinearOpMode {
|
||||
|
||||
turret = new Turret(robot, TELE, robot.limelight);
|
||||
|
||||
Spindexer.teleop = false;
|
||||
// Spindexer.teleop = false;
|
||||
|
||||
while (opModeInInit()) {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class Back_Poses {
|
||||
public static double bLeaveX = 90, bLeaveY = -50, bLeaveH = -50;
|
||||
|
||||
public static double rShootX = 100, rShootY = 60, rShootH = 145.2;
|
||||
public static double bShootX = 100, bShootY = -55, bShootH = -145.2;
|
||||
public static double bShootX = 100, bShootY = -60, bShootH = -145.2;
|
||||
|
||||
public static double rStackPickupFarAX = 73, rStackPickupFarAY = 51, rStackPickupFarAH = 145;
|
||||
public static double bStackPickupFarAX = 73, bStackPickupFarAY = -51, bStackPickupFarAH = -145;
|
||||
@@ -23,7 +23,7 @@ public class Back_Poses {
|
||||
public static double bStackPickupMiddleBX = 45, bStackPickupMiddleBY = -49, bStackPickupMiddleBH = -145.1;
|
||||
|
||||
public static double rPickupGateXA = 60, rPickupGateYA = 83, rPickupGateHA = 145;
|
||||
public static double bPickupGateXA = 70, bPickupGateYA = -90, bPickupGateHA = -145;
|
||||
public static double bPickupGateXA = 60, bPickupGateYA = -83, bPickupGateHA = -145;
|
||||
public static double rPickupGateXB = 84, rPickupGateYB = 76, rPickupGateHB = 145;
|
||||
public static double bPickupGateXB = 84, bPickupGateYB = -76, bPickupGateHB = -145;
|
||||
public static double rPickupGateXC = 50, rPickupGateYC = 83, rPickupGateHC = 190;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class Front_Poses {
|
||||
public static double bx2a = 41, by2a = -18, bh2a = -140;
|
||||
|
||||
public static double rx2b = 21, ry2b = 34, rh2b = 140.1;
|
||||
public static double bx2b = 23, by2b = -36, bh2b = -140.1;
|
||||
public static double bx2b = 23, by2b = -34, bh2b = -140.1;
|
||||
|
||||
public static double rx3a = 55, ry3a = 39, rh3a = 140;
|
||||
public static double bx3a = 55, by3a = -39, bh3a = -140;
|
||||
|
||||
@@ -155,13 +155,13 @@ public class TeleopV3 extends LinearOpMode {
|
||||
shootAll = false;
|
||||
servo.setTransferPos(transferServo_out);
|
||||
|
||||
//light.setState(StateEnums.LightState.BALL_COUNT);
|
||||
light.setState(StateEnums.LightState.BALL_COUNT);
|
||||
|
||||
} else if (gamepad2.triangle){
|
||||
//light.setState(StateEnums.LightState.BALL_COLOR);
|
||||
|
||||
} else {
|
||||
//light.setState(StateEnums.LightState.GOAL_LOCK);
|
||||
light.setState(StateEnums.LightState.BALL_COUNT);
|
||||
}
|
||||
|
||||
//TURRET TRACKING
|
||||
|
||||
@@ -525,7 +525,6 @@ public class Spindexer {
|
||||
break;
|
||||
|
||||
case SHOOTWAIT:
|
||||
double shootWaitMax = 4;
|
||||
// Stopping when we get to the new position
|
||||
if (prevIntakeState != currentIntakeState) {
|
||||
if (commandedIntakePosition==2) {
|
||||
@@ -550,26 +549,30 @@ public class Spindexer {
|
||||
|
||||
case SHOOT_PREP_CONTINOUS:
|
||||
if (servos.spinEqual(spinStartPos)){
|
||||
servos.setTransferPos(transferServo_in);
|
||||
currentIntakeState = Spindexer.IntakeState.SHOOT_CONTINOUS;
|
||||
} else {
|
||||
servos.setTransferPos(transferServo_out);
|
||||
servos.setSpinPos(spinStartPos);
|
||||
}
|
||||
break;
|
||||
|
||||
case SHOOT_CONTINOUS:
|
||||
servos.setTransferPos(transferServo_in);
|
||||
whileShooting = true;
|
||||
ballPositions[0].isEmpty = false;
|
||||
ballPositions[1].isEmpty = false;
|
||||
ballPositions[2].isEmpty = false;
|
||||
if (servos.getSpinPos() > spinEndPos){
|
||||
currentIntakeState = IntakeState.FINDNEXT;
|
||||
whileShooting = false;
|
||||
servos.setTransferPos(transferServo_out);
|
||||
shootTicks = 0;
|
||||
currentIntakeState = IntakeState.FINDNEXT;
|
||||
} else {
|
||||
double spinPos = robot.spin1.getPosition() + shootAllSpindexerSpeedIncrease;
|
||||
if (spinPos > spinEndPos + 0.03){
|
||||
spinPos = spinEndPos + 0.03;
|
||||
}
|
||||
moveSpindexerToPos(spinPos);
|
||||
servos.setSpinPos(spinPos);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -679,10 +682,8 @@ public class Spindexer {
|
||||
return ballPositions[RotatedBallPositions[commandedIntakePosition][RotatedBallPositionNames.REARCENTER.ordinal()]].ballColor;
|
||||
}
|
||||
private double prevPow = 0.501;
|
||||
private boolean firstIntakePow = true;
|
||||
public void setIntakePower(double pow){
|
||||
if (firstIntakePow || prevPow != pow){
|
||||
firstIntakePow = false;
|
||||
if (prevPow != 0.501 && prevPow != pow){
|
||||
robot.intake.setPower(pow);
|
||||
}
|
||||
prevPow = pow;
|
||||
|
||||
Reference in New Issue
Block a user