replace winchIn and winchOut with runWinchContinuous and stopWinch
authorCindy Zhang <cindyzyx9@gmail.com>
Mon, 15 Feb 2016 01:23:05 +0000 (17:23 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 18:55:21 +0000 (10:55 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/OI.java

index 3cb9f96c018d3b50007ecbf87addf5c9e416cc92..66a37d8fec9e9819e53c4401982d1322d386e717 100644 (file)
@@ -81,6 +81,7 @@ public class Constants {
 
     // Winch speeds
     public final static double WINCH_STOP_SPEED = 0.0;
+    public final static double WINCH_IN_SPEED = 0;
     public final static double SECONDS_TO_CLAMP = 2.0;
   }
 
index cc217235133db605ac73549cf3aa8755cf1785e7..adb37e4033af821e96a0f50487a48059b436d13a 100644 (file)
@@ -7,6 +7,8 @@ import org.usfirst.frc.team3501.robot.commands.auton.PassSallyPort;
 import org.usfirst.frc.team3501.robot.commands.intakearm.IntakeBall;
 import org.usfirst.frc.team3501.robot.commands.scaler.ExtendLift;
 import org.usfirst.frc.team3501.robot.commands.scaler.RetractLift;
+import org.usfirst.frc.team3501.robot.commands.scaler.RunWinchContinuous;
+import org.usfirst.frc.team3501.robot.commands.scaler.StopWinch;
 import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
 import org.usfirst.frc.team3501.robot.commands.shooter.runShooter;
 
@@ -97,7 +99,7 @@ public class OI {
     passSallyPort.whenPressed(new PassSallyPort());
 
     lowerChevalDeFrise
-        .whenPressed(/* TO DO: define this, and fill in commands */);
+    .whenPressed(/* TO DO: define this, and fill in commands */);
 
     if (toggleScalingMode.get()) {
       if (!isScalingMode) {
@@ -120,15 +122,16 @@ public class OI {
       shootBoulder.whenPressed(new Shoot());
 
     } else if (isScalingMode) {
-      toggleShooter.toggleWhenPressed(new WinchIn());
+      toggleShooter.whenPressed(new RunWinchContinuous(
+          Constants.Scaler.WINCH_IN_SPEED));
       compactRobot_1.whenPressed(new RetractLift());
 
-      intakeBoulder.toggleWhenPressed(new WinchOut());
+      intakeBoulder.whenReleased(new StopWinch());
       shootBoulder.whenPressed(new ExtendLift());
     }
 
     SpinRobot180_1
-        .whenPressed(/* rotate robot 180, reorient joystick controls */);
+    .whenPressed(/* rotate robot 180, reorient joystick controls */);
 
   }
 }