Commit | Line | Data |
---|---|---|
b449387d LH |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
b2640783 | 3 | public class DriveWithJoysticks extends Command { |
b449387d LH |
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 | } |