Skip to content

Commit 8281a91

Browse files
authored
Merge pull request #79 from DeepBlueRobotics/issue-78
Issue 78
2 parents d3d6e65 + de4135f commit 8281a91

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • Robot2019/src/main/java/frc/robot/commands

Robot2019/src/main/java/frc/robot/commands/Climb.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)