From bb8f83e76707fd9e4d81626acd907767f572b3d8 Mon Sep 17 00:00:00 2001 From: "truman.eustace" Date: Wed, 2 Oct 2024 19:45:07 -0400 Subject: [PATCH] nick and truman --- .../{components => }/TrumanLearnsTeleOP.java | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) rename TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/{components => }/TrumanLearnsTeleOP.java (62%) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/components/TrumanLearnsTeleOP.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/TrumanLearnsTeleOP.java similarity index 62% rename from TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/components/TrumanLearnsTeleOP.java rename to TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/TrumanLearnsTeleOP.java index a0c16ab..3e47577 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/components/TrumanLearnsTeleOP.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/TrumanLearnsTeleOP.java @@ -1,14 +1,10 @@ -package org.firstinspires.ftc.teamcode.opmode.components; +package org.firstinspires.ftc.teamcode.opmode; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.hardware.CRServo; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.hardware.DcMotorSimple; -import com.qualcomm.robotcore.hardware.Servo; -import com.qualcomm.robotcore.hardware.ServoController; - -import org.firstinspires.ftc.robotcore.internal.camera.delegating.DelegatingCaptureSequence; @TeleOp @@ -24,6 +20,7 @@ public void runOpMode() throws InterruptedException { float ly; float lx; float rx; + float ry; topLeftMotor = hardwareMap.get(DcMotor.class,"FL"); topRightMotor = hardwareMap.get(DcMotor.class,"FR"); bottomLeftMotor = hardwareMap.get(DcMotor.class,"BL"); @@ -38,20 +35,12 @@ public void runOpMode() throws InterruptedException { lx=gamepad1.left_stick_x; ly=gamepad1.left_stick_y; rx=gamepad1.right_stick_x; - topLeftMotor.setPower((ly-lx-rx)*motorSpeed); - // topRightMotor.setPower((ly-lx-rx)*motorSpeed); - // bottomLeftMotor.setPower((ly-lx+rx)*motorSpeed); - // bottomRightMotor.setPower((-rx+lx+ly)*motorSpeed); - /* - if (gamepad1.a) { - tail.setDirection(DcMotorSimple.Direction.FORWARD); - } - else { - tail.setDirection(DcMotorSimple.Direction.REVERSE); - } + ry=gamepad1.right_stick_y; - */ -// System.out.println(); + topLeftMotor.setPower(ly); + bottomLeftMotor.setPower(lx); + topRightMotor.setPower(rx); + bottomRightMotor.setPower(rx); } } }