Skip to content

Commit

Permalink
added climb winch controlls to testing file
Browse files Browse the repository at this point in the history
  • Loading branch information
crypticallylucid committed Dec 27, 2024
1 parent 41f9149 commit 650350c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.AnalogInput;

import org.firstinspires.ftc.teamcode.Robot;

@TeleOp(group = "competition")
@Config
public class ClimbTestEncoders extends LinearOpMode {
@Override
public void runOpMode() throws InterruptedException {
AnalogInput climb1Encoder = hardwareMap.get(AnalogInput.class, "climb1Encoder");
AnalogInput climb2Encoder = hardwareMap.get(AnalogInput.class, "climb2Encoder");
Robot robot = new Robot(hardwareMap, false);

telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry());

Expand All @@ -28,6 +31,15 @@ public void runOpMode() throws InterruptedException {
telemetry.addData("climb1", climb1);
telemetry.addData("climb2", climb2);

if (gamepad1.dpad_up){
robot.climbWinch.setPower(1);
}
else if (gamepad1.dpad_down){
robot.climbWinch.setPower(-1);
}else{
robot.climbWinch.setPower(0);
}

telemetry.update();
}
}
Expand Down

0 comments on commit 650350c

Please sign in to comment.