From 467d884b12c69f58cb5eb2ae557bec24e1d09bfd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 31 Jan 2016 14:58:03 -0500 Subject: let 'B' run the rear intake --- src/org/usfirst/frc/team4272/robot2016/Teleop.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/org') diff --git a/src/org/usfirst/frc/team4272/robot2016/Teleop.java b/src/org/usfirst/frc/team4272/robot2016/Teleop.java index 41919fa..0249eaa 100644 --- a/src/org/usfirst/frc/team4272/robot2016/Teleop.java +++ b/src/org/usfirst/frc/team4272/robot2016/Teleop.java @@ -24,13 +24,10 @@ public class Teleop { control.rDrive = jsScale(oi.rStick); control.arm = -oi.xbox.getAxis(Axis.LY); control.fBall = oi.xbox.getAxis(Axis.RTrigger) - oi.xbox.getAxis(Axis.LTrigger); - if (control.fBall < -0.1) { - control.bBall = -1; - } else { - control.bBall = oi.xbox.getButton(Button.A) ? 1 : 0; - } + control.bBall = Math.min(control.fBall, 0) + (oi.xbox.getButton(Button.A) ? 1 : 0) + (oi.xbox.getButton(Button.B) ? -1 : 0); SmartDashboard.putNumber("fBall", control.fBall); + SmartDashboard.putNumber("bBall", control.bBall); /* Take pictures */ /* -- cgit v1.2.3-54-g00ecf