public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 0;
- public final static int RIGHT_STICK_TRIGGER = 0;
+ public final static int TRIGGER_PORT = 0;
- public final static int RIGHT_STICK_LEFT_SILVER_BUTTON = 0;
- public final static int RIGHT_STICK_RIGHT_SILVER_BUTTON = 0;
- public final static int RIGHT_STICK_THUMB_BUTTON = 0;
+ public final static int DECREMENT_SHOOTER_PORT = 0;
+ public final static int INCREMENT_SHOOTER_PORT = 0;
+ public final static int SHOOTER_PORT = 0;
}
public static class DriveTrain {
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 decrementSpeed;
+ public static Button incrementSpeed;
+ public static Button outputCurrentShooterSpeed;
+ public static Button runWheel;
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);
+ decrementSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.DECREMENT_SHOOTER_PORT);
- rightSilverButton = new JoystickButton(rightJoystick,
- Constants.OI.RIGHT_STICK_RIGHT_SILVER_BUTTON);
+ incrementSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.INCREMENT_SHOOTER_PORT);
- thumbButton = new JoystickButton(rightJoystick,
- Constants.OI.RIGHT_STICK_THUMB_BUTTON);
+ outputCurrentShooterSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.SHOOTER_PORT);
+
+ runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
}
+++ /dev/null
-package org.usfirst.frc.team3501.robot.commands;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-/**
- *
- */
-public class ShooterTest extends Command {
-
- public ShooterTest() {
-
- requires(Robot.shooter);
- }
-
- @Override
- protected void initialize() {
- Robot.shooter.setSpeed(0.5);
-
- }
-
- @Override
- protected void execute() {
- boolean triggerPressed = Robot.oi.rightJoystick.getTrigger();
- boolean leftSidePressed = Robot.oi.leftSilverButton.get();
- boolean rightSidePressed = Robot.oi.rightSilverButton.get();
- boolean thumbPressed = Robot.oi.thumbButton.get();
-
- double currentWheelSpeed = Robot.shooter.getCurrentSpeed();
-
- if (triggerPressed == true) {
- Robot.shooter.setSpeed(currentWheelSpeed);
- } else {
- Robot.shooter.setSpeed(0.0);
- }
-
- if (leftSidePressed == true) {
- Robot.shooter.decrementSpeed(0.1);
- }
-
- if (rightSidePressed == true) {
- Robot.shooter.incrementSpeed(0.1);
- }
-
- if (thumbPressed == true) {
- System.out.println(Robot.shooter.getCurrentSpeed());
- }
-
- }
-
- // Make this return true when this Command no longer needs to run execute()
- @Override
- protected boolean isFinished() {
- return false;
- }
-
- // Called once after isFinished returns true
- @Override
- protected void end() {
- }
-
- // Called when another command which requires one or more of the same
- // subsystems is scheduled to run
- @Override
- protected void interrupted() {
- }
-}