stash before merge
This commit is contained in:
@@ -201,7 +201,7 @@ public class Auto_LT_Close extends LinearOpMode {
|
|||||||
rearSlotGreen++;
|
rearSlotGreen++;
|
||||||
}
|
}
|
||||||
|
|
||||||
robot.intake.setPower(1);
|
spindexer.setIntakePower(1);
|
||||||
|
|
||||||
decideGreenSlot = true;
|
decideGreenSlot = true;
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public class Auto_LT_Close extends LinearOpMode {
|
|||||||
} else if ((System.currentTimeMillis() - stamp) < (time * 1000)) {
|
} else if ((System.currentTimeMillis() - stamp) < (time * 1000)) {
|
||||||
// TELE.addData("MostGreenSlot", mostGreenSlot);
|
// TELE.addData("MostGreenSlot", mostGreenSlot);
|
||||||
// TELE.update();
|
// TELE.update();
|
||||||
robot.intake.setPower(-((System.currentTimeMillis() - stamp - colorSenseTime)) / 1000);
|
spindexer.setIntakePower(-((System.currentTimeMillis() - stamp - colorSenseTime)) / 1000);
|
||||||
|
|
||||||
servos.setSpinPos(firstSpindexShootPos);
|
servos.setSpinPos(firstSpindexShootPos);
|
||||||
|
|
||||||
@@ -294,14 +294,14 @@ public class Auto_LT_Close extends LinearOpMode {
|
|||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
|
|
||||||
robot.intake.setPower(-0.3);
|
spindexer.setIntakePower(-0.3);
|
||||||
|
|
||||||
if (ticker == 1) {
|
if (ticker == 1) {
|
||||||
stamp = getRuntime();
|
stamp = getRuntime();
|
||||||
}
|
}
|
||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
robot.intake.setPower(0);
|
spindexer.setIntakePower(0);
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
@@ -373,14 +373,14 @@ public class Auto_LT_Close extends LinearOpMode {
|
|||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
|
|
||||||
robot.intake.setPower(-0.3);
|
spindexer.setIntakePower(-0.3);
|
||||||
|
|
||||||
if (ticker == 1) {
|
if (ticker == 1) {
|
||||||
stamp = getRuntime();
|
stamp = getRuntime();
|
||||||
}
|
}
|
||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
robot.intake.setPower(0);
|
spindexer.setIntakePower(0);
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
@@ -448,7 +448,7 @@ public class Auto_LT_Close extends LinearOpMode {
|
|||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
spindexer.processIntake();
|
spindexer.processIntake();
|
||||||
robot.intake.setPower(1);
|
spindexer.setIntakePower(1);
|
||||||
|
|
||||||
spindexer.ballCounterLight();
|
spindexer.ballCounterLight();
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class Auto_LT_Far extends LinearOpMode {
|
|||||||
rearSlotGreen++;
|
rearSlotGreen++;
|
||||||
}
|
}
|
||||||
|
|
||||||
robot.intake.setPower(1);
|
spindexer.setIntakePower(1);
|
||||||
|
|
||||||
decideGreenSlot = true;
|
decideGreenSlot = true;
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ public class Auto_LT_Far extends LinearOpMode {
|
|||||||
} else if ((System.currentTimeMillis() - stamp) < (time * 1000)) {
|
} else if ((System.currentTimeMillis() - stamp) < (time * 1000)) {
|
||||||
// TELE.addData("MostGreenSlot", mostGreenSlot);
|
// TELE.addData("MostGreenSlot", mostGreenSlot);
|
||||||
// TELE.update();
|
// TELE.update();
|
||||||
robot.intake.setPower(-((System.currentTimeMillis() - stamp - colorSenseTime)) / 1000);
|
spindexer.setIntakePower(-((System.currentTimeMillis() - stamp - colorSenseTime)) / 1000);
|
||||||
|
|
||||||
servos.setSpinPos(firstSpindexShootPos);
|
servos.setSpinPos(firstSpindexShootPos);
|
||||||
|
|
||||||
@@ -239,14 +239,14 @@ public class Auto_LT_Far extends LinearOpMode {
|
|||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
|
|
||||||
robot.intake.setPower(-0.3);
|
spindexer.setIntakePower(-0.3);
|
||||||
|
|
||||||
if (ticker == 1) {
|
if (ticker == 1) {
|
||||||
stamp = getRuntime();
|
stamp = getRuntime();
|
||||||
}
|
}
|
||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
robot.intake.setPower(0);
|
spindexer.setIntakePower(0);
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
@@ -318,14 +318,14 @@ public class Auto_LT_Far extends LinearOpMode {
|
|||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
|
|
||||||
robot.intake.setPower(-0.3);
|
spindexer.setIntakePower(-0.3);
|
||||||
|
|
||||||
if (ticker == 1) {
|
if (ticker == 1) {
|
||||||
stamp = getRuntime();
|
stamp = getRuntime();
|
||||||
}
|
}
|
||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
robot.intake.setPower(0);
|
spindexer.setIntakePower(0);
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|
||||||
teleStart = drive.localizer.getPose();
|
teleStart = drive.localizer.getPose();
|
||||||
@@ -393,7 +393,7 @@ public class Auto_LT_Far extends LinearOpMode {
|
|||||||
ticker++;
|
ticker++;
|
||||||
|
|
||||||
spindexer.processIntake();
|
spindexer.processIntake();
|
||||||
robot.intake.setPower(1);
|
spindexer.setIntakePower(1);
|
||||||
|
|
||||||
spindexer.ballCounterLight();
|
spindexer.ballCounterLight();
|
||||||
drive.updatePoseEstimate();
|
drive.updatePoseEstimate();
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package org.firstinspires.ftc.teamcode.constants;
|
package org.firstinspires.ftc.teamcode.constants;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
|
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Config
|
@Config
|
||||||
public class Poses_V2 {
|
public class Poses_V2 {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package org.firstinspires.ftc.teamcode.constants;
|
package org.firstinspires.ftc.teamcode.constants;
|
||||||
|
|
||||||
import com.acmerobotics.dashboard.config.Config;
|
import com.acmerobotics.dashboard.config.Config;
|
||||||
|
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Config
|
@Config
|
||||||
public class ShooterVars {
|
public class ShooterVars {
|
||||||
|
|
||||||
|
|||||||
@@ -239,13 +239,12 @@ public class TeleopV3 extends LinearOpMode {
|
|||||||
|
|
||||||
// RIGHT_BUMPER
|
// RIGHT_BUMPER
|
||||||
if (gamepad1.right_bumper && intakeTicker > resetSpinTicks) {
|
if (gamepad1.right_bumper && intakeTicker > resetSpinTicks) {
|
||||||
robot.intake.setPower(1);
|
spindexer.setIntakePower(1);
|
||||||
} else if (gamepad1.cross) {
|
} else if (gamepad1.cross) {
|
||||||
robot.intake.setPower(-1);
|
spindexer.setIntakePower(-1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
robot.intake.setPower(0);
|
spindexer.setIntakePower(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LEFT_BUMPER
|
// LEFT_BUMPER
|
||||||
|
|||||||
@@ -625,4 +625,11 @@ public class Spindexer {
|
|||||||
public BallColor GetRearCenterColor () {
|
public BallColor GetRearCenterColor () {
|
||||||
return ballPositions[RotatedBallPositions[commandedIntakePosition][RotatedBallPositionNames.REARCENTER.ordinal()]].ballColor;
|
return ballPositions[RotatedBallPositions[commandedIntakePosition][RotatedBallPositionNames.REARCENTER.ordinal()]].ballColor;
|
||||||
}
|
}
|
||||||
|
private double prevPow = 0.501;
|
||||||
|
public void setIntakePower(double pow){
|
||||||
|
if (prevPow != 0.501 && prevPow != pow){
|
||||||
|
robot.intake.setPower(pow);
|
||||||
|
}
|
||||||
|
prevPow = pow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user