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"); | |
299be031 | 9 | |
b449387d LH |
10 | requires(drivetrain); |
11 | } | |
12 | ||
13 | protected void execute() { | |
e81578e3 LH |
14 | double forward = oi.getForwardR(); |
15 | double twist = oi.getTwistR(); | |
16 | ||
25e64587 | 17 | // option to lock twist for alignment |
e81578e3 LH |
18 | if (oi.getRightPressed(3, 4, 5, 6)) |
19 | twist = 0; | |
20 | ||
21 | drivetrain.drive(forward, twist); | |
b449387d LH |
22 | } |
23 | ||
24 | protected boolean isFinished() { | |
25 | return false; | |
26 | } | |
27 | } |