-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fast automatic climb lowering (for auton)
- Loading branch information
1 parent
3453b94
commit e70149f
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/frc/robot/commands/climb/ClimbLowerCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package frc.robot.commands.climb; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.climb.ClimbSubsystem; | ||
|
||
/** Lowers climb fully when off the chain. Should run at the start of auton to ensure that both arms are at their lowest | ||
* positions so that the robot may fit underneath the stage. */ | ||
public class ClimbLowerCommand extends Command { | ||
private static final double LOWERING_SPEED = -0.9; | ||
private final ClimbSubsystem climbSubsystem; | ||
|
||
/** Constructs a new {@link ClimbLowerCommand}. */ | ||
public ClimbLowerCommand(ClimbSubsystem climbSubsystem) { | ||
this.climbSubsystem = climbSubsystem; | ||
|
||
this.addRequirements(climbSubsystem); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
climbSubsystem.setSpeeds(LOWERING_SPEED, LOWERING_SPEED); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return climbSubsystem.isLowered(); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
super.end(interrupted); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters