Skip to content

Commit c343987

Browse files
committed
Update some TODO values with actual number
1 parent b1a6e3f commit c343987

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class Climb extends Command {
2323
private final double climbDown = -1;
2424
private final double retract = -1;
2525
private final double overrideThreshold = 0.1; // TODO: Set this to reasonable/tested value;
26-
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;
26+
private final double retractGoal = 15; // This only needs to be off the ground. Climb is 19 inches.
27+
private final double offGroundHeight = 10;
2828

2929
public Climb(Climber climber, Drivetrain dt, Joystick joy) {
3030
// Use requires() here to declare subsystem dependencies

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
public class KeepClimber extends Command {
1414
private Climber climber;
1515

16-
private final double retractSpeed = -1; // TODO: Confirm number
16+
private final double retractSpeed = -1;
17+
1718
public KeepClimber(Climber climber) {
1819
// Use requires() here to declare subsystem dependencies
1920
// eg. requires(chassis);
@@ -29,7 +30,7 @@ protected void initialize() {
2930
// Called repeatedly when this Command is scheduled to run
3031
@Override
3132
protected void execute() {
32-
if(climber.slipping()) {
33+
if (climber.slipping()) {
3334
climber.runClimber(retractSpeed);
3435
} else {
3536
climber.stopClimber();

Robot2019/src/main/java/frc/robot/subsystems/Climber.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class Climber extends Subsystem {
2222
private DoubleSolenoid pistons;
2323

2424
final private double minTilt = 0; // In degrees // TODO: Update wtih actual number
25-
final private double minDist = 13; // In inches // TODO: Update with actual number
25+
final private double minDist = 20; // In inches // TODO: Update with actual number
2626
final private double maxTilt = 30; // In degrees // TODO: Update with actual number
27-
final private double maxDist = 15; // In inches // TODO: Update with actual number
27+
final private double maxDist = 24; // In inches // TODO: Update with actual number
2828
final private double slipTolerance = 0.5; // In inches // TODO: Update with actual number;
2929

3030
public Climber(VictorSP motor, Encoder enc, AHRS ahrs, DoubleSolenoid pistons) {
@@ -33,7 +33,7 @@ public Climber(VictorSP motor, Encoder enc, AHRS ahrs, DoubleSolenoid pistons) {
3333
this.ahrs = ahrs;
3434
this.pistons = pistons;
3535

36-
double pulseFraction = 1.0/256;
36+
double pulseFraction = 1.0 / 256;
3737
double pitchDiameter = 1.790; // https://www.vexrobotics.com/35-sprockets.html#Drawing
3838
enc.setDistancePerPulse(pulseFraction * Math.PI * pitchDiameter);
3939
enc.reset();
@@ -51,7 +51,7 @@ public void stopClimber() {
5151
motor.stopMotor();
5252
}
5353

54-
//We are erring on the side of changing directions too much
54+
// We are erring on the side of changing directions too much
5555
public boolean needToClimb() {
5656
double angle = Math.atan2(ahrs.getRawAccelZ(), ahrs.getRawAccelX());
5757
angle *= 180 / Math.PI;

0 commit comments

Comments
 (0)