File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
MiniBot/teleop/CircularDriveAssembly Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 10
10
import org .firstinspires .ftc .teamcode .MiniBot .teleop .CrossCommunicator ;
11
11
12
12
public class CircularDriveController {
13
- private DcMotor left ;
13
+ // private DcMotor left;
14
14
private DcMotor right ;
15
15
16
16
public void init (Telemetry telemetry , HardwareMap hardwareMap ) {
@@ -41,7 +41,15 @@ public void start() {
41
41
}
42
42
43
43
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
+ }
45
53
}
46
54
47
55
public void stop () {
You can’t perform that action at this time.
0 commit comments