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;
public static final int ENCODER_RIGHT_B = 3;
public static final SPI.Port GYRO_PORT = SPI.Port.kOnboardCS0;
+
+ public final static int TRIGGER_DRIVE_PORT = 0;
}
public static class Intake {
public static final int INTAKE_ROLLER_PORT = 8;
+ public final static int HOLD_INTAKE_PORT = 0;
+
}
public static enum Direction {
package org.usfirst.frc.team3501.robot;
+import org.usfirst.frc.team3501.robot.commands.climber.MaintainClimbedPosition;
+import org.usfirst.frc.team3501.robot.commands.climber.RunWinchContinuous;
import org.usfirst.frc.team3501.robot.commands.climber.ToggleWinch;
import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
import org.usfirst.frc.team3501.robot.commands.intake.ReverseIntakeContinuous;
public static Joystick leftJoystick;
public static Joystick rightJoystick;
public static Button toggleWinch;
+ private boolean isClimbing = false;
public static Button runIndexWheel;
public static Button reverseIndexWheel;
decreaseShooterSpeed = new JoystickButton(leftJoystick,
Constants.OI.DECREASE_SHOOTER_SPEED_PORT);
decreaseShooterSpeed.whenPressed(new DecreaseShootingSpeed());
+
+ if (!isClimbing) {
+ toggleWinch.whenPressed(new RunWinchContinuous());
+ isClimbing = true;
+ } else {
+ toggleWinch.whenPressed(new MaintainClimbedPosition());
+ isClimbing = false;
+ }
}
public static OI getOI() {
*
*/
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
}
@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
private PIDController driveController;
private PIDController gyroController;
+ private boolean isClimbing;
+ private static double CLIMBER_SPEED;;
+
private DriveTrain() {
driveController = new PIDController(driveP, driveI, driveD);
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() {
protected void initDefaultCommand() {
setDefaultCommand(new JoystickDrive());
}
+
+ public boolean isClimbing() {
+ return this.isClimbing;
+ }
+
+ public double getClimbingSpeed() {
+ return this.CLIMBER_SPEED;
+ }
+
}