-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/frc/robot/commands/IntakeSetPivotCommand.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,15 @@ | ||
package frc.robot.commands; | ||
|
||
import frc.robot.subsystems.AlgaeIntakeSubsystem.AlgaeIntakeSubsystem; | ||
|
||
public class IntakeSetPivotCommand { | ||
private final AlgaeIntakeSubsystem intakeSubsystem; | ||
|
||
public IntakeSetPivotCommand(AlgaeIntakeSubsystem subsystem) { | ||
this.intakeSubsystem = subsystem; | ||
} | ||
|
||
public void initialize() { intakeSubsystem.setPivotToVoltage(); } | ||
|
||
public boolean isFinished() { return true; } | ||
} |
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
15 changes: 11 additions & 4 deletions
15
src/main/java/frc/robot/subsystems/AlgaeIntakeSubsystem/AlgaeIntakeSubsystem.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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
package frc.robot.subsystems.AlgaeIntakeSubsystem; | ||
|
||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
import frc.robot.constants.IntakeConstants; | ||
|
||
public class AlgaeIntakeSubsystem extends SubsystemBase { | ||
private final IntakeIO intake; | ||
|
||
private final IntakeIO.IntakeInputsAutoLogged inputs = new IntakeIO.IntakeInputsAutoLogged(); | ||
public AlgaeIntakeSubsystem(IntakeIO intake){ | ||
this.intake = intake; | ||
} | ||
|
||
public void pickup() { | ||
intake.pivotDown(); | ||
intake.pivotUp(); | ||
public void setPivotToVoltage() { | ||
intake.setPivotVoltage(IntakeConstants.pivotVoltsTarget); | ||
} | ||
|
||
public void setRollersToVoltage() { | ||
intake.setRollersVoltage(IntakeConstants.rollerVoltsTarget); | ||
} | ||
|
||
public void periodic() { | ||
intake.updateInputs(inputs); | ||
} | ||
|
||
} |
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
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