summaryrefslogtreecommitdiff
path: root/src/org/usfirst/frc/team4272/robot2016/Teleop.java
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-01-31 15:12:47 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-01-31 15:12:47 -0500
commit582f062811d298efc6a0d4c09ca746a240a96220 (patch)
treeb3887fa6181200bfd40955325beab9c7843eb660 /src/org/usfirst/frc/team4272/robot2016/Teleop.java
parent894d9ddd315c058b8ede29dc8fadba742ca148af (diff)
Only run one set of drive motors unless triggers are pulled (to save power)
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2016/Teleop.java')
-rw-r--r--src/org/usfirst/frc/team4272/robot2016/Teleop.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2016/Teleop.java b/src/org/usfirst/frc/team4272/robot2016/Teleop.java
index 0de200d..b082adb 100644
--- a/src/org/usfirst/frc/team4272/robot2016/Teleop.java
+++ b/src/org/usfirst/frc/team4272/robot2016/Teleop.java
@@ -28,8 +28,10 @@ public class Teleop {
public Control run(Control control, HwOI oi) {
/* Drive */
- control.lDrive = jsScale(oi.lStick);
- control.rDrive = jsScale(oi.rStick);
+ control.lDrive1 = jsScale(oi.lStick);
+ control.rDrive1 = jsScale(oi.rStick);
+ control.lDrive2 = oi.lStick.getTrigger() ? control.lDrive1 : 0;
+ control.rDrive2 = oi.rStick.getTrigger() ? control.rDrive1 : 0;
control.arm = -oi.xbox.getAxis(Axis.LY);
control.fBall = bound(-1, oi.xbox.getAxis(Axis.RTrigger) - oi.xbox.getAxis(Axis.LTrigger), 1);
control.bBall = bound(-1,