From 1bfa24f2e5164f72ac1a2bc0143f137c62fcf496 Mon Sep 17 00:00:00 2001 From: Cindy Zhang Date: Sun, 14 Feb 2016 17:23:05 -0800 Subject: [PATCH] replace winchIn and winchOut with runWinchContinuous and stopWinch --- src/org/usfirst/frc/team3501/robot/Constants.java | 1 + src/org/usfirst/frc/team3501/robot/OI.java | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 3cb9f96c..66a37d8f 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -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; } diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index cc217235..adb37e40 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -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 */); } } -- 2.30.2