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 @@ - + 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)