public static final Value HIGH_GEAR = DoubleSolenoid.Value.kForward;
public static final Value LOW_GEAR = DoubleSolenoid.Value.kReverse;
- public static final double CLIMBER_SPEED = 5;
-
// MOTOR CONTROLLERS
public static final int FRONT_LEFT = 1;
public static final int FRONT_RIGHT = 3;
toggleWinch = new JoystickButton(leftJoystick,
Constants.OI.TOGGLE_WINCH_PORT);
- toggleWinch.whenPressed(new ToggleWinch());
increaseShooterSpeed = new JoystickButton(leftJoystick,
Constants.OI.INCREASE_SHOOTER_SPEED_PORT);
toggleWinch.whenPressed(new MaintainClimbedPosition());
isClimbing = false;
}
+
/*
* if (!Robot.getDriveTrain().isClimbing()) { toggleWinch.whenPressed(new
* RunWinchContinuous()); Robot.getDriveTrain().setClimbing(true); } else {
+++ /dev/null
-package org.usfirst.frc.team3501.robot.commandgroups;
-
-import org.usfirst.frc.team3501.robot.Robot;
-import org.usfirst.frc.team3501.robot.commands.climber.MaintainClimbedPosition;
-import org.usfirst.frc.team3501.robot.commands.climber.RunWinchContinuous;
-
-import edu.wpi.first.wpilibj.command.CommandGroup;
-
-public class ToggleWinch extends CommandGroup {
-
- public ToggleWinch() {
- if (!Robot.getDriveTrain().isClimbing()) {
- Robot.getDriveTrain().setClimbing(true);
- addSequential(new RunWinchContinuous());
-
- } else {
- Robot.getDriveTrain().setClimbing(false);
- addSequential(new MaintainClimbedPosition());
- }
- }
-
-}
*
*/
public class RunWinchContinuous extends Command {
-<<<<<<< HEAD
+
DriveTrain driveTrain = Robot.getDriveTrain();
private double climbingSpeed;
-=======
->>>>>>> Add JoystickButton objects and constants for Drivetrain, Climer, Intake, and Shooter
/**
* See JavaDoc comment in class for details
* value range is from -1 to 1
*/
public RunWinchContinuous() {
-<<<<<<< HEAD
requires(driveTrain);
climbingSpeed = driveTrain.CLIMBER_SPEED;
-=======
requires(Robot.getDriveTrain());
->>>>>>> Add JoystickButton objects and constants for Drivetrain, Climer, Intake, and Shooter
+ requires(driveTrain);
}
@Override
protected void initialize() {
-<<<<<<< HEAD
-=======
- Robot.getDriveTrain().setMotorValues(
- Robot.getDriveTrain().getClimbingSpeed(),
- Robot.getDriveTrain().getClimbingSpeed());
->>>>>>> Add JoystickButton objects and constants for Drivetrain, Climer, Intake, and Shooter
}
@Override
@Override
protected boolean isFinished() {
- return Robot.getOI().toggleWinch.get();
+ return false;
}
@Override
private boolean isClimbing;
private static double CLIMBER_SPEED;;
+ public boolean shouldBeClimbing;
private DriveTrain() {
rightGearPiston = new DoubleSolenoid(Constants.DriveTrain.PISTON_MODULE,
Constants.DriveTrain.RIGHT_GEAR_PISTON_FORWARD,
Constants.DriveTrain.RIGHT_GEAR_PISTON_REVERSE);
-
- CLIMBER_SPEED = Constants.DriveTrain.CLIMBER_SPEED;
}
public PIDController getDriveController() {
frontRight.set(-right);
rearRight.set(-right);
- this.isClimbing = true;
}
public void joystickDrive(final double thrust, final double twist) {
public void stop() {
setMotorValues(0, 0);
- this.isClimbing = false;
}
public double getLeftMotorVal() {
protected void initDefaultCommand() {
setDefaultCommand(new JoystickDrive());
}
-
- public boolean isClimbing() {
- return this.isClimbing;
- }
-
- public void setClimbing(boolean isClimbing) {
- this.isClimbing = isClimbing;
- }
-
- public double getClimbingSpeed() {
- return this.CLIMBER_SPEED;
- }
-
}