From f29a35076ae83468c67afedd08354d3af06ff7eb Mon Sep 17 00:00:00 2001 From: MqxS Date: Fri, 18 Oct 2024 23:52:47 -0400 Subject: [PATCH] READY FOR GRITS DAY 2 --- src/main/java/frc/robot/Robot.java | 1 - src/main/java/frc/robot/auto/Autos.java | 44 +++++++++---------- .../superstructure/ShotParameters.java | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 440ec99..c1c2781 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -75,7 +75,6 @@ public class Robot extends LoggedRobot { public final Shooter shooter = new Shooter(Constants.CURRENT_MODE, HardwareConstants.SHOOTER); public final Superstructure superstructure = new Superstructure(arm, shooter); - @SuppressWarnings("unused") public final PhotonVision photonVision = new PhotonVision(Constants.CURRENT_MODE, swerve, swerve.getPoseEstimator()); public final NoteState noteState = new NoteState(Constants.CURRENT_MODE, intake); diff --git a/src/main/java/frc/robot/auto/Autos.java b/src/main/java/frc/robot/auto/Autos.java index ca5753e..bcee514 100644 --- a/src/main/java/frc/robot/auto/Autos.java +++ b/src/main/java/frc/robot/auto/Autos.java @@ -339,7 +339,7 @@ public EventLoop ampSpeaker2Center2_3() { autoTriggers.atTime(0.4).onTrue( Commands.sequence( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ) ); @@ -353,7 +353,7 @@ public EventLoop ampSpeaker2Center2_3() { autoTriggers.atTime(3).onTrue( Commands.sequence( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ) ); @@ -366,7 +366,7 @@ public EventLoop ampSpeaker2Center2_3() { autoTriggers.atTime(7).onTrue( Commands.sequence( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ) ); @@ -388,7 +388,7 @@ public EventLoop speaker2_1_0() { autoTriggers.atTime(0.4).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -403,7 +403,7 @@ public EventLoop speaker2_1_0() { autoTriggers.atTime(2.3).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -418,7 +418,7 @@ public EventLoop speaker2_1_0() { autoTriggers.atTime(4.6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake2") ); @@ -451,7 +451,7 @@ public EventLoop sourceCenter1_0() { autoTriggers.atTime(1.7).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -465,7 +465,7 @@ public EventLoop sourceCenter1_0() { autoTriggers.atTime(6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -487,7 +487,7 @@ public EventLoop ampCenter3_2() { autoTriggers.atTime(2).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -501,7 +501,7 @@ public EventLoop ampCenter3_2() { autoTriggers.atTime(6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -523,7 +523,7 @@ public EventLoop ampCenter2_3() { autoTriggers.atTime(2).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -537,7 +537,7 @@ public EventLoop ampCenter2_3() { autoTriggers.atTime(5.85).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -559,7 +559,7 @@ public EventLoop ampCenter4_3() { autoTriggers.atTime(1.8).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -576,7 +576,7 @@ public EventLoop ampCenter4_3() { autoTriggers.atTime(5).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -601,7 +601,7 @@ public EventLoop ampCenter3_4() { autoTriggers.atTime(1.8).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -618,7 +618,7 @@ public EventLoop ampCenter3_4() { autoTriggers.atTime(5.2).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -1034,7 +1034,7 @@ public EventLoop sourceCenter0_1_2() { autoTriggers.atTime(1.6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake0") ); @@ -1052,7 +1052,7 @@ public EventLoop sourceCenter0_1_2() { autoTriggers.atTime(6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), shootCommands.readySuperstructureForShot() ).withName("Intake1") ); @@ -1096,7 +1096,7 @@ public EventLoop altSourceCenter0_1_2() { autoTriggers.atTime(1.6).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), Commands.sequence( Commands.waitUntil(noteState.hasNote), shootCommands.readySuperstructureForShot().asProxy() @@ -1117,7 +1117,7 @@ public EventLoop altSourceCenter0_1_2() { autoTriggers.atTime(5.5).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), Commands.sequence( Commands.waitUntil(noteState.hasNote), shootCommands.readySuperstructureForShot().asProxy() @@ -1164,7 +1164,7 @@ public EventLoop sourceCenter1_0_2() { autoTriggers.atTime(1.8).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), Commands.sequence( Commands.waitUntil(noteState.hasNote), shootCommands.readySuperstructureForShot().asProxy() @@ -1185,7 +1185,7 @@ public EventLoop sourceCenter1_0_2() { autoTriggers.atTime(6.2).onTrue( Commands.parallel( - intake.intakeCommand(), + intake.intakeCommand().asProxy(), Commands.sequence( Commands.waitUntil(noteState.hasNote), shootCommands.readySuperstructureForShot().asProxy() diff --git a/src/main/java/frc/robot/subsystems/superstructure/ShotParameters.java b/src/main/java/frc/robot/subsystems/superstructure/ShotParameters.java index e4d9236..8030858 100644 --- a/src/main/java/frc/robot/subsystems/superstructure/ShotParameters.java +++ b/src/main/java/frc/robot/subsystems/superstructure/ShotParameters.java @@ -80,7 +80,7 @@ public Parameters interpolate(final Parameters endValue, final double t) { )); shotDataMap.put(4d, new Parameters( - Rotation2d.fromDegrees(26), + Rotation2d.fromDegrees(27), 84.433, 128.883, 84.433,