Skip to content

Commit

Permalink
[#101] Merged Main
Browse files Browse the repository at this point in the history
  • Loading branch information
MattD8957 committed Jan 26, 2024
1 parent d025326 commit dfbf535
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/java/frc/robot/command/Climb.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ public void initialize() {
setPoint = ClimbConstants.CLIMB_PID_SETPOINT_EXTENDED;
}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
// use pid to set climber power
double pidOutput = climbController.calculate(climber.getHeight(), setPoint);
climber.setPower(pidOutput);

LightningShuffleboard.setDouble("Climb", "Climb Height", climber.getHeight());
LightningShuffleboard.setDouble("Climb", "Climb Power", pidOutput);

}
/**
* retracts climb to 0
*/
Expand All @@ -69,6 +58,9 @@ public void execute() {
if (extended() && tipDetection.isTipped()) {
retract();
}

LightningShuffleboard.setDouble("Climb", "Climb Height", climber.getHeight());
LightningShuffleboard.setDouble("Climb", "Climb Power", pidOutput);
}

/**
Expand Down

0 comments on commit dfbf535

Please sign in to comment.