File tree Expand file tree Collapse file tree
Robot2019/src/main/java/frc/robot/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,11 +19,12 @@ public class Climb extends Command {
1919 private State state ;
2020
2121 private final double backDrive = -0.5 ; // TODO: Set this to reasonable/tested value;
22- private final double climbUp = 0.5 ; // TODO: Set this to reasonable/tested value ;
23- private final double climbDown = -0.5 ; // TODO: Set this to reasonable/tested value ;
24- private final double retract = -0.5 ; // TODO: Set this to reasonable/tested value ;
22+ private final double climbUp = 1 ;
23+ private final double climbDown = -1 ;
24+ private final double retract = -1 ;
2525 private final double overrideThreshold = 0.1 ; // TODO: Set this to reasonable/tested value;
2626 private final double retractGoal = 0 ; // TODO: Set this to reasonable/tested value;
27+ private final double offGroundHeight = 10 ; // TODO: Set this to reasonable/tested value;
2728
2829 public Climb (Climber climber , Drivetrain dt , Joystick joy ) {
2930 // Use requires() here to declare subsystem dependencies
@@ -102,7 +103,7 @@ protected void interrupted() {
102103 * overriding the climb
103104 */
104105 private boolean robotOnPlatform () {
105- return dt .isStalled () || Math .abs (dtJoy .getY ()) > overrideThreshold ;
106+ return ( dt .isStalled () && climber . getEncDistance () > offGroundHeight ) || Math .abs (dtJoy .getY ()) > overrideThreshold ;
106107 }
107108
108109 private enum State {
You can’t perform that action at this time.
0 commit comments