From 6bc58a47243daf1ce2b0de99390eb0c49d446103 Mon Sep 17 00:00:00 2001 From: 535tobor <535tobor@gmail.com> Date: Fri, 26 Jan 2024 17:24:02 -0500 Subject: [PATCH] 1.1 --- .../gamecode/autonomous/BlueBoardSide.java | 8 ++ .../gamecode/autonomous/BlueFarSide.java | 17 +++- .../gamecode/autonomous/RedBoardSide.java | 7 ++ .../gamecode/autonomous/RedFarSide.java | 7 ++ .../{TeamProps.java => TeamProp_Find.java} | 49 +++++------ .../gamecode/autonomous/TeamProp_Guessed.java | 81 +++++++++++++++++++ .../gamecode/teleop/DriverControlled.java | 36 ++++++++- .../EncoderTickDefinitions.java | 3 + 8 files changed, 180 insertions(+), 28 deletions(-) rename TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/{TeamProps.java => TeamProp_Find.java} (78%) create mode 100644 TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Guessed.java diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueBoardSide.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueBoardSide.java index 81332d5..0570b37 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueBoardSide.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueBoardSide.java @@ -8,6 +8,7 @@ import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EachMotorSet.drive; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.backwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeLeftAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.turnLeftAuto; @@ -15,6 +16,7 @@ import com.google.firebase.crashlytics.buildtools.reloc.org.apache.commons.codec.Encoder; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.hardware.DistanceSensor; import com.qualcomm.robotcore.hardware.Servo; import org.firstinspires.ftc.teamcode.operations.Target_operations; @@ -54,8 +56,14 @@ public void runInitLoop(){} @Override public void runStart() { + // guess that team prop is in middle + forwardAuto(30,3,500); + backwardAuto(30,3,500); + + // park forwardAuto(3,1,500); strafeLeftAuto(37,1,500); + // pixel pushed } @Override public void runStop() { diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueFarSide.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueFarSide.java index 7297723..71f907d 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueFarSide.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/BlueFarSide.java @@ -7,10 +7,12 @@ import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.forwardMotors; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EachMotorSet.drive; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.backwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeLeftAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeRightAuto; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.Target_definingDriveMovements.ticksPerInch; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; @@ -21,6 +23,7 @@ @Autonomous(name="Blue, Far Side", group="auto") public class BlueFarSide extends Target_operations { + double inches; @Override public void runOpMode() { @@ -49,17 +52,25 @@ public void runInitLoop() { @Override public void runStart() { - forwardAuto(3,3,500); // + // guess that team prop is in middle + forwardAuto(30,3,500); + backwardAuto(30,3,500); + + // park + // grab pixel + forwardAuto(3, 3,500); // strafeRightAuto(8,3,500); // forwardAuto(15,3,500); // strafeRightAuto(17,3,500); // forwardAuto(58,3,500); - strafeLeftAuto(110,3,500); + strafeLeftAuto(123,3,500); + // let go of pixel + } @Override public void runLoop() { - + telemetry.addData("target ", 500); telemetry.addData("position FL ", fl.getCurrentPosition()); telemetry.addData("position FR ", fr.getCurrentPosition()); telemetry.addData("position BL ", bl.getCurrentPosition()); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedBoardSide.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedBoardSide.java index a23dddd..d26f599 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedBoardSide.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedBoardSide.java @@ -8,6 +8,7 @@ import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EachMotorSet.drive; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.backwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeRightAuto; @@ -48,8 +49,14 @@ public void runInitLoop() { @Override public void runStart() { + // guess that team prop is in middle + forwardAuto(30,3,500); + backwardAuto(30,3,500); + + // park forwardAuto(3,1,500); strafeRightAuto(39,1,500); + // pixel pushed } @Override diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedFarSide.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedFarSide.java index aa01cf4..e83d3a8 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedFarSide.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/RedFarSide.java @@ -45,12 +45,19 @@ public void runInitLoop() { @Override public void runStart() { + // guess that team prop is in middle + forwardAuto(30,3,500); + backwardAuto(30,3,500); + + // park + // grab pixel forwardAuto(3, 3,500); // strafeLeftAuto(8,3,500); // forwardAuto(15,3,500); // strafeLeftAuto(17,3,500); // forwardAuto(58,3,500); strafeRightAuto(123,3,500); + // let go of pixel } @Override diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProps.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Find.java similarity index 78% rename from TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProps.java rename to TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Find.java index 47dff5e..0d31429 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProps.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Find.java @@ -1,35 +1,32 @@ package org.firstinspires.ftc.teamcode.gamecode.autonomous; import static org.firstinspires.ftc.teamcode.operations.inputs.AprilTag.initAprilTag; +import static org.firstinspires.ftc.teamcode.operations.inputs.Target_inputs.imu; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.bl; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.br; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fl; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.forwardMotors; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; -import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.CentricMovements.fieldCentric.turn; -import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EachMotorSet.drive; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.backwardAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto; - +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeLeftAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.strafeRightAuto; - import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.turnLeftAuto; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.turnRightAuto; -import com.google.firebase.crashlytics.buildtools.reloc.org.apache.commons.codec.Encoder; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DistanceSensor; -import com.qualcomm.robotcore.hardware.Servo; +import com.qualcomm.robotcore.hardware.IMU; import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; import org.firstinspires.ftc.teamcode.operations.Target_operations; -import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Wheels; import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Encoders; +import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Wheels; -@Autonomous(name="Team Props", group="auto") -public class TeamProps extends Target_operations { +@Autonomous(name="Blue, Board Side 2 -> Team Props", group="auto") +public class TeamProp_Find extends Target_operations { DcMotor arm; DistanceSensor sensorRange; @@ -53,11 +50,10 @@ public void runInit() { sensorRange = hardwareMap.get(DistanceSensor.class, "eye"); // ^ set motor directions initAprilTag(hardwareMap, "Webcam 1", telemetry); + imu = hardwareMap.get(IMU.class, "imu"); Encoders.use(); Encoders.clear(); - - } @Override @@ -65,25 +61,32 @@ public void runInitLoop(){} @Override public void runStart() { - backwardAuto(13,3,200); // away from wall. - turnRightAuto(580+45+22,3,500); -// styles said 290 should = 45 degrees so 45 + 45 is 90 so 580 because 290 + 290 = 580 + // close claw + forwardAuto(21,3,500); + if (sensorRange.getDistance(DistanceUnit.INCH) < 7) { // zone 2 + // open claw + } + else { + turnLeftAuto(180*20, 3,500); // zone 1 + if (sensorRange.getDistance(DistanceUnit.INCH) < 7) { + // open claw + } + else { + turnLeftAuto(180*20*2, 3,500); + forwardAuto(3,3,500); + // open claw + } + } + } + - /*sleep(2500); - backwardAuto(5,1,500); - sleep(2500); - strafeRightAuto(3, 1,500); - if (sensorRange.getDistance(DistanceUnit.INCH) <= 20) { - backwardAuto(5,1,500); - }*/ - } @Override public void runStop() { stopAll(); } @Override public void runLoop() { - telemetry.addData("distance ", sensorRange.getDistance(DistanceUnit.INCH)); + telemetry.addData("position FL ", fl.getCurrentPosition()); telemetry.addData("position FR ", fr.getCurrentPosition()); telemetry.addData("position BL ", bl.getCurrentPosition()); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Guessed.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Guessed.java new file mode 100644 index 0000000..9030a03 --- /dev/null +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/autonomous/TeamProp_Guessed.java @@ -0,0 +1,81 @@ +package org.firstinspires.ftc.teamcode.gamecode.autonomous; + +import static org.firstinspires.ftc.teamcode.operations.inputs.AprilTag.initAprilTag; +import static org.firstinspires.ftc.teamcode.operations.inputs.Target_inputs.imu; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.bl; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.br; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fl; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.forwardMotors; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EncoderTickDefinitions.forwardAuto; + +import com.qualcomm.robotcore.eventloop.opmode.Autonomous; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.hardware.DistanceSensor; +import com.qualcomm.robotcore.hardware.IMU; + +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; +import org.firstinspires.ftc.teamcode.operations.Target_operations; +import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Wheels; +import org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Encoders; + +@Autonomous(name="Chance Program (Team Prop)", group="auto") +public class TeamProp_Guessed extends Target_operations { + + DcMotor arm; + DistanceSensor sensorRange; + double degrees; + + @Override + public void runOpMode() throws InterruptedException { + // LinearOpMode that calls a different form of OpMode: + runInit(); + while(opModeInInit()){runInitLoop();} + waitForStart(); + runStart(); + if (isStopRequested()){runStop();} // stop OpMode if the button is pressed + while (opModeIsActive()) {runLoop();} + } + + @Override + public void runInit() { + //arm = hardwareMap.dcMotor.get("arm"); + mapMotors(hardwareMap, Wheels.FRONT_LEFT.abbreviation(),Wheels.FRONT_RIGHT.abbreviation(),Wheels.BACK_LEFT.abbreviation(),Wheels.BACK_RIGHT.abbreviation()); + forwardMotors(true,false,true,false); + sensorRange = hardwareMap.get(DistanceSensor.class, "eye"); + // ^ set motor directions + initAprilTag(hardwareMap, "Webcam 1", telemetry); + imu = hardwareMap.get(IMU.class, "imu"); + Encoders.use(); + Encoders.clear(); + + + + } + + @Override + public void runInitLoop(){} + + @Override + public void runStart() { + forwardAuto(30,5,100); // push pixel onto guessed tape + + } + @Override + public void runStop() { + stopAll(); + } + @Override + public void runLoop() { + telemetry.addData("distance ", sensorRange.getDistance(DistanceUnit.INCH)); + telemetry.addData("position FL ", fl.getCurrentPosition()); + telemetry.addData("position FR ", fr.getCurrentPosition()); + telemetry.addData("position BL ", bl.getCurrentPosition()); + telemetry.addData("position BR ", br.getCurrentPosition()); + telemetry.addData("degree ", imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.DEGREES)); + telemetry.update(); + } +} + diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/teleop/DriverControlled.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/teleop/DriverControlled.java index 96d7ac4..c005310 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/teleop/DriverControlled.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamecode/teleop/DriverControlled.java @@ -3,12 +3,18 @@ import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.LogoFacingDirection.UP; import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.UsbFacingDirection.BACKWARD; import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.UsbFacingDirection.LEFT; +import static com.qualcomm.hardware.rev.RevHubOrientationOnRobot.UsbFacingDirection.RIGHT; import static org.firstinspires.ftc.teamcode.operations.inputs.AprilTag.initAprilTag; import static org.firstinspires.ftc.teamcode.operations.inputs.AprilTag.visionPortal; import static org.firstinspires.ftc.teamcode.operations.inputs.Imu.imuGet; import static org.firstinspires.ftc.teamcode.operations.inputs.Imu.imuReset; import static org.firstinspires.ftc.teamcode.operations.inputs.Target_inputs.cameraConnected; +import static org.firstinspires.ftc.teamcode.operations.inputs.Target_inputs.imu; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.bl; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.br; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fl; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.forwardMotors; +import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.fr; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.ConfigureMotors.mapMotors; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Mecanum.botHeading; import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.Mecanum.dpadMovements; @@ -18,17 +24,23 @@ import static org.firstinspires.ftc.teamcode.operations.outputs.motors.drive.definingDriveMovements.EachMotorSet.driveStop; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DistanceSensor; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; import org.firstinspires.ftc.teamcode.operations.inputs.DeviceNames; import org.firstinspires.ftc.teamcode.operations.Target_operations; @TeleOp public class DriverControlled extends Target_operations { double speed = 0.5; // speed used when using hardcore mode + DistanceSensor sensorRange; + boolean rangePluggedIn; @Override public void runOpMode() { runInit(); + if (isStopRequested()){runStop();} while(opModeInInit()){runInitLoop();} waitForStart(); runStart(); @@ -36,6 +48,8 @@ public void runOpMode() { while (opModeIsActive()) {runLoop();} } + + @Override public void runInit() { mapMotors(hardwareMap, "fl","fr","bl","br"); @@ -44,8 +58,15 @@ public void runInit() { // this is commented because it might show an error sense this motor is not configured and can't be because the motor is not yet connected. // ConfigureMotorPixel.mapMotor("pixel"); // (hardwareMap, imu device name, logo, USB) - imuGet(hardwareMap, DeviceNames.DEFAULT_IMU.hardwareMapName(), LEFT.name(), UP.name()); + imuGet(hardwareMap, DeviceNames.DEFAULT_IMU.hardwareMapName(), RIGHT.name(), UP.name()); initAprilTag(hardwareMap, DeviceNames.DEFAULT_CAMERA.hardwareMapName(), telemetry); + try { + sensorRange = hardwareMap.get(DistanceSensor.class, "eye"); + rangePluggedIn = true; + } + catch (Exception E){ + rangePluggedIn = false; + } // ConfigureMotorPixel.mapMotor(hardwareMap, "pixel"); // PixelMotorMovements.motorEncoder(); // pixel motor not connected @@ -67,7 +88,18 @@ public void runLoop() { imuReset(gamepad1.options); // resets imu case of accidents or incidences fieldCentricMath(); // does the required math for Mecanum drive as well as getting imu for field centric - telemetry.addData("", botHeading); + + telemetry.addData("bot heading: ", botHeading); + if (rangePluggedIn) { + telemetry.addData("distance ", sensorRange.getDistance(DistanceUnit.INCH)); + } + telemetry.addData("position FL ", fl.getCurrentPosition()); + telemetry.addData("position FR ", fr.getCurrentPosition()); + telemetry.addData("position BL ", bl.getCurrentPosition()); + telemetry.addData("position BR ", br.getCurrentPosition()); + telemetry.addData("degrees ", imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.DEGREES)); + telemetry.update(); + //convertPowerToEncoderUse(); //runPixelMotor(gamepad2.a); //runBarMotor(gamepad2.y); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations/outputs/motors/drive/definingDriveMovements/EncoderTickDefinitions.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations/outputs/motors/drive/definingDriveMovements/EncoderTickDefinitions.java index f1a2dfd..ecce2ef 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations/outputs/motors/drive/definingDriveMovements/EncoderTickDefinitions.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations/outputs/motors/drive/definingDriveMovements/EncoderTickDefinitions.java @@ -19,6 +19,7 @@ public static void forwardAuto(double inches, long seconds, int encoderSpeed) { drive(-encoderSpeed,-encoderSpeed,-encoderSpeed,-encoderSpeed); // sets the velocity drive sleep(seconds*1000); driveStop(); + } public static void backwardAuto(double inches, long seconds, int encoderSpeed) { // forward good. @@ -29,6 +30,7 @@ public static void backwardAuto(double inches, long seconds, int encoderSpeed) { drive(encoderSpeed,encoderSpeed,encoderSpeed,encoderSpeed); // sets the velocity drive sleep(seconds*1000); driveStop(); + } public static void strafeLeftAuto(double inches, long seconds, int encoderSpeed) { // strafe good. // this is left @@ -40,6 +42,7 @@ public static void strafeLeftAuto(double inches, long seconds, int encoderSpeed) sleep(seconds*1000); driveStop(); + } public static void strafeRightAuto(double inches, long seconds, int encoderSpeed) { // strafe good. // this is left