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