From 23edb953a358d53eb0d2d0880c64b20c94e20ff3 Mon Sep 17 00:00:00 2001 From: Nishk04 Date: Sat, 11 Nov 2023 20:13:27 -0800 Subject: [PATCH] Made all simple autonomous code with the beginning meaning after init is pressed the claw locks and goes into stow mode. --- .../java/org/firstinspires/ftc/teamcode/BlueLeftBackstage.java | 3 ++- .../org/firstinspires/ftc/teamcode/BlueRightFrontstage.java | 2 ++ .../java/org/firstinspires/ftc/teamcode/RedLeftFrontstage.java | 2 ++ .../java/org/firstinspires/ftc/teamcode/RedRightBackstage.java | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueLeftBackstage.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueLeftBackstage.java index dd0fe0d3d695..e813f440724e 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueLeftBackstage.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueLeftBackstage.java @@ -30,7 +30,8 @@ public void runOpMode() { driveMotors.backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); - + claw.rotate.setPosition(Claw.ROTATE_STOW); + claw.grip.setPosition(Claw.GRIP_CLOSED); waitForStart(); telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0)); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueRightFrontstage.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueRightFrontstage.java index c197232cd87c..14ac6f4d7fe7 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueRightFrontstage.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BlueRightFrontstage.java @@ -31,6 +31,8 @@ public void runOpMode() { intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); double setPoint = 24; + claw.rotate.setPosition(Claw.ROTATE_STOW); + claw.grip.setPosition(Claw.GRIP_CLOSED); waitForStart(); telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0)); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedLeftFrontstage.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedLeftFrontstage.java index 9110d42e551e..3d5362ae362d 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedLeftFrontstage.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedLeftFrontstage.java @@ -31,6 +31,8 @@ public void runOpMode() { intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); double setPoint = 24; + claw.rotate.setPosition(Claw.ROTATE_STOW); + claw.grip.setPosition(Claw.GRIP_CLOSED); waitForStart(); telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0)); diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedRightBackstage.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedRightBackstage.java index 4a58e0175676..480ffef7b632 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedRightBackstage.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RedRightBackstage.java @@ -31,6 +31,8 @@ public void runOpMode() { intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); double setPoint = 30; + claw.rotate.setPosition(Claw.ROTATE_STOW); + claw.grip.setPosition(Claw.GRIP_CLOSED); waitForStart(); telemetry.addData("Distance Driven Forward:", OdoToInches((driveMotors.backRight.getCurrentPosition() + driveMotors.frontLeft.getCurrentPosition())/2.0));