summaryrefslogtreecommitdiff
path: root/src/org/usfirst
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/usfirst')
-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 */
/*