add comment for joc
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / commands / DriveWithJoysticks.java
CommitLineData
b449387d
LH
1package org.usfirst.frc.team3501.robot.commands;
2
3public class DriveWithJoysticks extends CommandBase {
4
5 public DriveWithJoysticks() {
6 super("DriveWithJoysticks");
7 requires(drivetrain);
8 }
9
10 protected void execute() {
e81578e3
LH
11 double forward = oi.getForwardR();
12 double twist = oi.getTwistR();
13
25e64587 14 // option to lock twist for alignment
e81578e3
LH
15 if (oi.getRightPressed(3, 4, 5, 6))
16 twist = 0;
17
18 drivetrain.drive(forward, twist);
b449387d
LH
19 }
20
21 protected boolean isFinished() {
22 return false;
23 }
24}