X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FOI.java;h=17889c7073c21796465fa0294b3c3f057a7ec139;hb=37e5a1215ef4909e720304e619667d40492dfaf1;hp=5322f36255843eda81a4ac4e63b2f68ffb5b5b4b;hpb=9f3a7bd486b275ad4082a2356847647a8411bfc8;p=3501%2Fstronghold-2016 diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index 5322f362..17889c70 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -1,5 +1,8 @@ package org.usfirst.frc.team3501.robot; +import org.usfirst.frc.team3501.robot.commands.ChangeShooterSpeed; +import org.usfirst.frc.team3501.robot.commands.SetShooterSpeed; + import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.buttons.Button; import edu.wpi.first.wpilibj.buttons.JoystickButton; @@ -18,15 +21,18 @@ public class OI { decrementShooterSpeed = new JoystickButton(rightJoystick, Constants.OI.DEC_SHOOTER_SPD_PORT); + decrementShooterSpeed.whenPressed(new ChangeShooterSpeed(-0.1)); incrementShooterSpeed = new JoystickButton(rightJoystick, Constants.OI.INC_SHOOTER_SPD_PORT); + incrementShooterSpeed.whenPressed(new ChangeShooterSpeed(0.1)); outputCurrentShooterSpeed = new JoystickButton(rightJoystick, Constants.OI.SHOOT_PORT); trigger = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT); + trigger.whenPressed(new SetShooterSpeed(0.5)); + trigger.whenReleased(new SetShooterSpeed(0.0)); } - }