Commit | Line | Data |
---|---|---|
b449387d LH |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
5b3b1652 LH |
3 | import org.usfirst.frc.team3501.bases.Command; |
4 | ||
b2640783 | 5 | public 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 | } |