package org.usfirst.frc.team3501.robot;
import edu.wpi.first.wpilibj.Joystick;
+import edu.wpi.first.wpilibj.buttons.Button;
+import edu.wpi.first.wpilibj.buttons.JoystickButton;
public class OI {
private static OI oi;
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
- Â toggleWinch = new JoystickButton(leftJoystick,Constants.OI.TOGGLE_WINCH_PORT);
+ toggleWinch = new JoystickButton(leftJoystick,
+ Constants.OI.TOGGLE_WINCH_PORT);
}
import edu.wpi.first.wpilibj.command.Command;
/**
- * Runs the winch for a given time and motor value
+ * This command runs the winch for a given motor value and time in seconds
*
+ * @param motorVal
+ * value range is from -1 to 1
+ * @param time
+ * in seconds
* @author shivanighanta
*
*/
import edu.wpi.first.wpilibj.command.Command;
/**
- * Runs the winch continuously at a given motor value
+ * This command will run the winch motor continuously until the button
+ * triggering it is released
*
* @author shivanighanta
*
@Override
protected boolean isFinished() {
- return false;
+ return !Robot.getOI().toggleWinch.get();
}
@Override