projects
/
3501
/
stronghold-2016
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add everything all commands to specific packages
[3501/stronghold-2016]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
OI.java
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index d644cf7188d0fc6aa53454f5674bf31506fd06c7..1c891af08f5e26dcf2b9e9bb7a3baae61b3ec938 100644
(file)
--- 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;
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;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
@@
-7,26
+10,29
@@
import edu.wpi.first.wpilibj.buttons.JoystickButton;
public class OI {
public static Joystick leftJoystick;
public static Joystick rightJoystick;
public class OI {
public static Joystick leftJoystick;
public static Joystick rightJoystick;
- public static Button decrementSpeed;
- public static Button incrementSpeed;
+ public static Button decrementS
hooterS
peed;
+ public static Button incrementS
hooterS
peed;
public static Button outputCurrentShooterSpeed;
public static Button outputCurrentShooterSpeed;
- public static Button
runWheel
;
+ public static Button
trigger
;
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
- decrementSpeed = new JoystickButton(rightJoystick,
- Constants.OI.DECREMENT_SHOOTER_PORT);
+ decrementShooterSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.DECREMENT_SHOOTER_SPEED_PORT);
+ decrementShooterSpeed.whenPressed(new ChangeShooterSpeed(-0.1));
- incrementSpeed = new JoystickButton(rightJoystick,
- Constants.OI.INCREMENT_SHOOTER_PORT);
+ incrementShooterSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.INCREMENT_SHOOTER_SPEED_PORT);
+ incrementShooterSpeed.whenPressed(new ChangeShooterSpeed(0.1));
outputCurrentShooterSpeed = new JoystickButton(rightJoystick,
outputCurrentShooterSpeed = new JoystickButton(rightJoystick,
- Constants.OI.SHOOT
ER
_PORT);
+ Constants.OI.SHOOT_PORT);
- runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
+ trigger = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
+ trigger.whenPressed(new SetShooterSpeed(0.5));
+ trigger.whenReleased(new SetShooterSpeed(0.0));
}
}
-
}
}