-
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.
feat: full path interupt, spit shots, drive with correction addition
- Loading branch information
Showing
7 changed files
with
101 additions
and
27 deletions.
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
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
26 changes: 26 additions & 0 deletions
26
src/main/java/org/team1540/robot2024/commands/shooter/SpitShoot.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,26 @@ | ||
package org.team1540.robot2024.commands.shooter; | ||
|
||
import edu.wpi.first.math.geometry.Pose2d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; | ||
import org.team1540.robot2024.Constants; | ||
import org.team1540.robot2024.commands.indexer.IntakeAndFeed; | ||
import org.team1540.robot2024.subsystems.indexer.Indexer; | ||
import org.team1540.robot2024.subsystems.shooter.Shooter; | ||
import org.team1540.robot2024.util.shooter.ShooterSetpoint; | ||
import org.team1540.robot2024.util.vision.AprilTagsCrescendo; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class SpitShoot extends ParallelCommandGroup { | ||
public SpitShoot(Shooter shooter, Indexer indexer, double leftSetpoint, double rightSetpoint, double indexerPercent, double feederPercent) { | ||
addCommands( | ||
new IntakeAndFeed(indexer, ()->indexerPercent, ()->feederPercent), | ||
new PrepareShooterCommand(shooter, ()-> new ShooterSetpoint(0, leftSetpoint, rightSetpoint)) | ||
); | ||
} | ||
|
||
public SpitShoot(Shooter shooter, Indexer indexer){ | ||
this(shooter, indexer, Constants.Shooter.Flywheels.LEFT_RPM, Constants.Shooter.Flywheels.RIGHT_RPM, 1, 1); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/team1540/robot2024/commands/shooter/SpitShootWithTargeting.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,18 @@ | ||
package org.team1540.robot2024.commands.shooter; | ||
|
||
import edu.wpi.first.wpilibj.XboxController; | ||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; | ||
import org.team1540.robot2024.Constants; | ||
import org.team1540.robot2024.commands.drivetrain.DriveWithTargetingCommand; | ||
import org.team1540.robot2024.subsystems.drive.Drivetrain; | ||
import org.team1540.robot2024.subsystems.indexer.Indexer; | ||
import org.team1540.robot2024.subsystems.shooter.Shooter; | ||
|
||
public class SpitShootWithTargeting extends ParallelCommandGroup { | ||
public SpitShootWithTargeting(XboxController controller, Drivetrain drivetrain, Shooter shooter, Indexer indexer) { | ||
addCommands( | ||
new DriveWithTargetingCommand(drivetrain,controller, Constants.Targeting::getSpeakerPose), | ||
new SpitShoot(shooter, indexer) | ||
); | ||
} | ||
} |
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