Set buttons in OI to run changeSpeed command when pressed
authorEvanYap <evanyap.14@gmail.com>
Fri, 22 Jan 2016 03:00:37 +0000 (19:00 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/OI.java

index d644cf7188d0fc6aa53454f5674bf31506fd06c7..4367d6ae50ea68a7b3d2bda87707e826c42abc7a 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.changeSpeed;
+
 import edu.wpi.first.wpilibj.Joystick;
 import edu.wpi.first.wpilibj.buttons.Button;
 import edu.wpi.first.wpilibj.buttons.JoystickButton;
@@ -27,6 +29,10 @@ public class OI {
 
     runWheel = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
 
+    incrementSpeed.whenPressed(new changeSpeed(0.1));
+
+    decrementSpeed.whenPressed(new changeSpeed(-0.1));
+
   }
 
 }