Skip to content

Commit b5141b8

Browse files
author
glingy
committed
Added new button
1 parent 7e4ce8f commit b5141b8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

MiniBot/teleop/CircularDriveAssembly/CircularDriveController.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.firstinspires.ftc.teamcode.MiniBot.teleop.CrossCommunicator;
1111

1212
public class CircularDriveController {
13-
private DcMotor left;
13+
//private DcMotor left;
1414
private DcMotor right;
1515

1616
public void init(Telemetry telemetry, HardwareMap hardwareMap) {
@@ -41,7 +41,15 @@ public void start() {
4141
}
4242

4343
public void loop(Gamepad gamepad1, Gamepad gamepad2) {
44-
right.setPower(gamepad1.b ? 0 : 1);
44+
if (gamepad1.right_bumper) {
45+
right.setDirection(DcMotorSimple.Direction.FORWARD);
46+
right.setPower(1);
47+
} else if (gamepad1.left_bumper) {
48+
right.setDirection(DcMotorSimple.Direction.REVERSE);
49+
right.setPower(1);
50+
} else {
51+
right.setPower(0);
52+
}
4553
}
4654

4755
public void stop() {

0 commit comments

Comments
 (0)