summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-01-31 14:58:03 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-01-31 14:58:03 -0500
commit467d884b12c69f58cb5eb2ae557bec24e1d09bfd (patch)
tree7283261ccfe819b2478924cea6d19dfacdfbe0a3 /src
parent1e1db45c3b5aa8b15da06818023deb1140823a5f (diff)
let 'B' run the rear intake
Diffstat (limited to 'src')
-rw-r--r--src/org/usfirst/frc/team4272/robot2016/Teleop.java7
1 files changed, 2 insertions, 5 deletions
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 */
/*