From 5ae5a82a7d7627ebcb26461b9dab42b0b655552a Mon Sep 17 00:00:00 2001 From: Mouse05 <63749658+Mouse05@users.noreply.github.com> Date: Thu, 3 Dec 2020 18:56:37 -0800 Subject: [PATCH 1/2] Random Changes --- .idea/misc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 37a750962da6..7bfef59df1ca 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + From 283706c30a61ddefb19791dbcf7c79504ba30645 Mon Sep 17 00:00:00 2001 From: Mouse05 <63749658+Mouse05@users.noreply.github.com> Date: Mon, 21 Dec 2020 16:27:35 -0800 Subject: [PATCH 2/2] Hopper code (in testing) --- .../java/org/firstinspires/ftc/teamcode/IntakeClass.java | 9 +++++++-- .../java/org/firstinspires/ftc/teamcode/testing.java | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/IntakeClass.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/IntakeClass.java index 12a8998889cf..9d0edd27d4f3 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/IntakeClass.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/IntakeClass.java @@ -12,6 +12,7 @@ abstract class IntakeClass extends LinearOpMode { protected DcMotor intake; + protected DcMotor hopper; public void runOpMode() { setupDriveMotors(); @@ -26,6 +27,7 @@ protected void setupDriveMotors() { updateTelemetryMessage("Initializing Motors"); intake = hardwareMap.get(DcMotor.class, "intake"); + hopper = hardwareMap.get(DcMotor.class, "hopper"); // Most robots need the motor on one side to be reve`rsed to drive goBackward @@ -49,7 +51,7 @@ protected void setupDriveMotors() { public void stop(final String message) { intake.setPower(0.0); - + hopper.setPower(0.0); updateTelemetryMessage(message); } @@ -82,7 +84,10 @@ public void intake(final double intakepower, final int duration){ sleep(duration); } - + public void hopper(final double hopperpower, final int duration){ + hopper.setPower(hopperpower); + sleep(duration); + } /* public void armUp(final double armpower, final int duration) { diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing.java index c494ae4fd2d1..61486a8f7eee 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing.java @@ -27,6 +27,13 @@ public void runOpModeImpl() { intake.setPower(0); } + if (gamepad1.x) { + hopper.setPower(1); + } + + if (gamepad1.y) { + hopper.setPower(0); + } // left bumper - to close claw (front servo)