X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FOI.java;h=1c891af08f5e26dcf2b9e9bb7a3baae61b3ec938;hb=6bb7f8ac8eca89a8e0b308720f7e15178eef43ea;hp=9516b93599e228b5b9e18b47335e596bbf18dabd;hpb=7f12e81730a9447aba08810467ba03937d5e7a90;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 9516b935..1c891af0 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.shooter.ChangeShooterSpeed; +import org.usfirst.frc.team3501.robot.commands.shooter.SetShooterSpeed; + import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.buttons.Button; import edu.wpi.first.wpilibj.buttons.JoystickButton; @@ -7,24 +10,29 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton; public class OI { public static Joystick leftJoystick; public static Joystick rightJoystick; - public static Button leftSilverButton; - public static Button rightSilverButton; - public static Button thumbButton; + public static Button decrementShooterSpeed; + public static Button incrementShooterSpeed; + public static Button outputCurrentShooterSpeed; + public static Button trigger; public OI() { leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT); rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT); - leftSilverButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_LEFT_SILVER_BUTTON); - ; + decrementShooterSpeed = new JoystickButton(rightJoystick, + Constants.OI.DECREMENT_SHOOTER_SPEED_PORT); + decrementShooterSpeed.whenPressed(new ChangeShooterSpeed(-0.1)); - rightSilverButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_RIGHT_SILVER_BUTTON); - ; - thumbButton = new JoystickButton(rightJoystick, - Constants.OI.RIGHT_STICK_THUMB_BUTTON); + incrementShooterSpeed = new JoystickButton(rightJoystick, + Constants.OI.INCREMENT_SHOOTER_SPEED_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)); + + } }