Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into multi-step-autoaim
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-Bauroth committed Apr 4, 2024
2 parents 317f808 + 7653f35 commit b496c63
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
19 changes: 3 additions & 16 deletions src/main/deploy/pathplanner/autos/Greedy.auto
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,9 @@
}
},
{
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 0.08
}
},
{
"type": "named",
"data": {
"name": "Shoot When Ready"
}
}
]
"type": "named",
"data": {
"name": "Shoot When Ready"
}
}
]
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public String getCameraName() {
)
.onlyWhile(() -> !feeder.getBeamBroken())
.withTimeout(3.0)
)
).raceWith(SpecializedCommands.timeoutDuringAutoSim(3.0))
);
NamedCommands.registerCommand(
"Shoot",
Expand Down Expand Up @@ -345,7 +345,6 @@ private void configureButtonBindings() {
feeder::getBeamBroken
)
);
driverController.rightBumper().whileTrue(IntakeCommands.idleCommand(intake));

operatorController
.povLeft()
Expand Down Expand Up @@ -432,13 +431,15 @@ private void configureButtonBindings() {
// .onlyWhile(feeder::getBeamBroken)
// .andThen(ShooterCommands.ampAngle(shooter)));
driverController
.povUp()
.rightBumper()
.whileTrue(
sequence(
FeederCommands.feedToShooter(feeder)
.alongWith(ShooterCommands.ampSpin(shooter)).until(() -> !feeder.getBeamBroken()),
.alongWith(ShooterCommands.ampSpin(shooter)).withTimeout(0.2),
ShooterCommands.ampAng(shooter)
.alongWith(ShooterCommands.ampGo(shooter, 400))
.alongWith(ShooterCommands.ampGo(shooter, 600))
.withTimeout(0.25)
.andThen(ShooterCommands.setAmpAngle(shooter, -0.4))
)


Expand Down
10 changes: 8 additions & 2 deletions src/main/java/frc/robot/commands/ShooterCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,14 @@ public static Command newAmpShoot(Shooter shooter){

public static Command ampSpin(Shooter shooter){
return run(() -> {
shooter.setTargetShooterAngle(Rotation2d.fromRadians(1.114));
shooter.shooterRunVelocity(300);
shooter.setTargetShooterAngle(Rotation2d.fromRadians(0.925));
shooter.shooterRunVelocity(600);
});
}

public static Command setAmpAngle(Shooter shooter, double angle){
return run(() -> {
shooter.setTargetShooterAngle(Rotation2d.fromRadians(angle));
});
}

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/subsystems/intake/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public void setFeedControl(boolean disabled) {
boolean disableFeedControl = false;
@Override
public void periodic() {
if(inputs.armPositionRad < 1.715 && inputs.armPositionRad > -0.97){
io.setRollerPercent(0.0);
}
if (mustReset) {
resetArmFB();
mustReset = false;
Expand Down
10 changes: 5 additions & 5 deletions vendordeps/REVLib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "REVLib.json",
"name": "REVLib",
"version": "2024.2.2",
"version": "2024.2.4",
"frcYear": "2024",
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
"mavenUrls": [
Expand All @@ -12,14 +12,14 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-java",
"version": "2024.2.2"
"version": "2024.2.4"
}
],
"jniDependencies": [
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver",
"version": "2024.2.2",
"version": "2024.2.4",
"skipInvalidPlatforms": true,
"isJar": false,
"validPlatforms": [
Expand All @@ -37,7 +37,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-cpp",
"version": "2024.2.2",
"version": "2024.2.4",
"libName": "REVLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand All @@ -55,7 +55,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver",
"version": "2024.2.2",
"version": "2024.2.4",
"libName": "REVLibDriver",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
10 changes: 5 additions & 5 deletions vendordeps/photonlib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "photonlib.json",
"name": "photonlib",
"version": "v2024.2.8",
"version": "v2024.3.1",
"uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -14,7 +14,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-cpp",
"version": "v2024.2.8",
"version": "v2024.3.1",
"libName": "photonlib",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -29,7 +29,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-cpp",
"version": "v2024.2.8",
"version": "v2024.3.1",
"libName": "photontargeting",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -46,12 +46,12 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-java",
"version": "v2024.2.8"
"version": "v2024.3.1"
},
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-java",
"version": "v2024.2.8"
"version": "v2024.3.1"
}
]
}

0 comments on commit b496c63

Please sign in to comment.