From 0cd7d882325d8f053d979d147f74ce4c5187e500 Mon Sep 17 00:00:00 2001 From: MattD8957 Date: Fri, 5 Apr 2024 18:11:16 -0400 Subject: [PATCH] COMP States - Q74 --- src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto | 2 +- .../deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto | 6 +++--- src/main/deploy/pathplanner/paths/BB-C3.path | 4 ++-- src/main/deploy/pathplanner/paths/BF-C3.path | 4 ++-- src/main/deploy/pathplanner/paths/C2-C3.path | 4 ++-- src/main/deploy/pathplanner/paths/C3-C2.path | 6 +++--- src/main/deploy/pathplanner/paths/C3-F1.path | 6 +++--- src/main/deploy/pathplanner/paths/C3-F2.path | 6 +++--- src/main/deploy/pathplanner/paths/C3-F3.path | 4 ++-- src/main/deploy/pathplanner/paths/Linked Point.path | 6 +++--- src/main/deploy/pathplanner/paths/SB-C3.path | 4 ++-- src/main/deploy/pathplanner/paths/SF-C3.path | 4 ++-- src/main/java/frc/robot/Constants.java | 4 ++-- src/main/java/frc/robot/RobotContainer.java | 10 +++++----- .../shoot/AutonCand/{CandLine.java => Cand35.java} | 6 +++--- 15 files changed, 38 insertions(+), 38 deletions(-) rename src/main/java/frc/robot/command/shoot/AutonCand/{CandLine.java => Cand35.java} (91%) diff --git a/src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto b/src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto index 891ccf17..b6762627 100644 --- a/src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto +++ b/src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto @@ -141,7 +141,7 @@ { "type": "named", "data": { - "name": null + "name": "Stop-Flywheel" } }, { diff --git a/src/main/deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto b/src/main/deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto index 83b02daa..e3ecf6af 100644 --- a/src/main/deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto +++ b/src/main/deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto @@ -90,7 +90,7 @@ { "type": "named", "data": { - "name": "Smart-Shoot" + "name": "Cand-3.5" } }, { @@ -159,7 +159,7 @@ { "type": "named", "data": { - "name": "Smart-Shoot" + "name": "Cand-3.5" } }, { @@ -253,7 +253,7 @@ { "type": "named", "data": { - "name": "Smart-Shoot" + "name": "Cand-3.5" } } ] diff --git a/src/main/deploy/pathplanner/paths/BB-C3.path b/src/main/deploy/pathplanner/paths/BB-C3.path index ab735c6b..8b0afe02 100644 --- a/src/main/deploy/pathplanner/paths/BB-C3.path +++ b/src/main/deploy/pathplanner/paths/BB-C3.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 0.5535511224868603, + "x": 0.8035511224868603, "y": 3.7506652859459564 }, "nextControl": null, diff --git a/src/main/deploy/pathplanner/paths/BF-C3.path b/src/main/deploy/pathplanner/paths/BF-C3.path index a4863b57..3ee77fe5 100644 --- a/src/main/deploy/pathplanner/paths/BF-C3.path +++ b/src/main/deploy/pathplanner/paths/BF-C3.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 0.7015552646489911, + "x": 0.9515552646489911, "y": 3.8 }, "nextControl": null, diff --git a/src/main/deploy/pathplanner/paths/C2-C3.path b/src/main/deploy/pathplanner/paths/C2-C3.path index f5061f86..252bb8c8 100644 --- a/src/main/deploy/pathplanner/paths/C2-C3.path +++ b/src/main/deploy/pathplanner/paths/C2-C3.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 1.6100701432172113, + "x": 1.8600701432172113, "y": 3.818506867782967 }, "nextControl": null, diff --git a/src/main/deploy/pathplanner/paths/C3-C2.path b/src/main/deploy/pathplanner/paths/C3-C2.path index 28d9e552..d7df3000 100644 --- a/src/main/deploy/pathplanner/paths/C3-C2.path +++ b/src/main/deploy/pathplanner/paths/C3-C2.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": null, "nextControl": { - "x": 1.3199370860280193, - "y": 4.065180438053184 + "x": 1.5699370860280193, + "y": 4.065180438053185 }, "isLocked": false, "linkedName": "C3" diff --git a/src/main/deploy/pathplanner/paths/C3-F1.path b/src/main/deploy/pathplanner/paths/C3-F1.path index 382407bb..3669571a 100644 --- a/src/main/deploy/pathplanner/paths/C3-F1.path +++ b/src/main/deploy/pathplanner/paths/C3-F1.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": null, "nextControl": { - "x": 2.2506652859459564, - "y": 6.493675387350774 + "x": 2.5006652859459564, + "y": 6.493675387350775 }, "isLocked": false, "linkedName": "C3" diff --git a/src/main/deploy/pathplanner/paths/C3-F2.path b/src/main/deploy/pathplanner/paths/C3-F2.path index 768623cf..4693f145 100644 --- a/src/main/deploy/pathplanner/paths/C3-F2.path +++ b/src/main/deploy/pathplanner/paths/C3-F2.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": null, "nextControl": { - "x": 2.2605322287567655, - "y": 5.664852191242843 + "x": 2.5105322287567655, + "y": 5.664852191242844 }, "isLocked": false, "linkedName": "C3" diff --git a/src/main/deploy/pathplanner/paths/C3-F3.path b/src/main/deploy/pathplanner/paths/C3-F3.path index 3f2e1ef2..53db8fb2 100644 --- a/src/main/deploy/pathplanner/paths/C3-F3.path +++ b/src/main/deploy/pathplanner/paths/C3-F3.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": null, "nextControl": { - "x": 2.5553683061717036, + "x": 2.8053683061717036, "y": 2.79888993444178 }, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Linked Point.path b/src/main/deploy/pathplanner/paths/Linked Point.path index 2b08285f..427b653c 100644 --- a/src/main/deploy/pathplanner/paths/Linked Point.path +++ b/src/main/deploy/pathplanner/paths/Linked Point.path @@ -96,15 +96,15 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 2.284355857409949, + "x": 2.534355857409949, "y": 3.8948306037374874 }, "nextControl": { - "x": 2.3156441425900507, + "x": 2.5656441425900507, "y": 3.7051693962625123 }, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/SB-C3.path b/src/main/deploy/pathplanner/paths/SB-C3.path index 78fde5e5..23c176a9 100644 --- a/src/main/deploy/pathplanner/paths/SB-C3.path +++ b/src/main/deploy/pathplanner/paths/SB-C3.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 1.673062054584547, + "x": 1.923062054584547, "y": 3.895854323169196 }, "nextControl": null, diff --git a/src/main/deploy/pathplanner/paths/SF-C3.path b/src/main/deploy/pathplanner/paths/SF-C3.path index 2179a60d..5abcdb45 100644 --- a/src/main/deploy/pathplanner/paths/SF-C3.path +++ b/src/main/deploy/pathplanner/paths/SF-C3.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.3, + "x": 2.55, "y": 3.8 }, "prevControl": { - "x": 1.0703621626929412, + "x": 1.3203621626929412, "y": 3.788289163454219 }, "nextControl": null, diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 9f212883..ec3a379f 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -677,8 +677,8 @@ public class CandConstants { // TODO get real public static final double C3_ANGLE = 0; // Line - public static final double LINE_RPM = 0; - public static final double LINE_ANGLE = 0; + public static final double LINE_RPM = 4100d; + public static final double LINE_ANGLE = 28.7; // Source public static final double SOURCE_RPM = -300d; // TODO test diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 1f523b7a..204a562d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -58,10 +58,10 @@ import frc.robot.command.shoot.Tune; import frc.robot.command.shoot.preAim; import frc.robot.command.shoot.AutonCand.AmpShotAuton; +import frc.robot.command.shoot.AutonCand.Cand35; import frc.robot.command.shoot.AutonCand.CandC1; import frc.robot.command.shoot.AutonCand.CandC2; import frc.robot.command.shoot.AutonCand.CandC3; -import frc.robot.command.shoot.AutonCand.CandLine; import frc.robot.command.shoot.AutonCand.PointBlankShotAuton; import frc.robot.command.tests.CollectorSystemTest; import frc.robot.command.tests.DrivetrainSystemTest; @@ -167,7 +167,7 @@ protected void initializeNamedCommands() { NamedCommands.registerCommand("Cand-C1", new CandC1(flywheel, pivot, indexer)); NamedCommands.registerCommand("Cand-C2", new CandC2(flywheel, pivot, indexer)); NamedCommands.registerCommand("Cand-C3", new CandC3(flywheel, pivot, indexer)); - NamedCommands.registerCommand("Cand-Line", new CandLine(flywheel, pivot, indexer)); + NamedCommands.registerCommand("Cand-3.5", new Cand35(flywheel, pivot, indexer)); NamedCommands.registerCommand("AMP", new AmpShotAuton(flywheel, pivot, indexer)); NamedCommands.registerCommand("Stow", new Stow(flywheel, pivot)); NamedCommands.registerCommand("Smart-Shoot", @@ -259,9 +259,9 @@ protected void configureButtonBindings() { new Trigger(coPilot::getXButton) .whileTrue(new PointBlankShot(flywheel, pivot).deadlineWith(leds.enableState(LED_STATES.SHOOTING))); // new Trigger(coPilot::getYButton).whileTrue(new PivotUP(pivot)); - new Trigger(coPilot::getYButton).whileTrue(new NotePass(flywheel, pivot)); - // new Trigger(coPilot::getAButton).whileTrue(new Tune(flywheel, pivot) - // .deadlineWith(leds.enableState(LED_STATES.SHOOTING))); + // new Trigger(coPilot::getYButton).whileTrue(new NotePass(flywheel, pivot)); + new Trigger(coPilot::getYButton).whileTrue(new Tune(flywheel, pivot) + .deadlineWith(leds.enableState(LED_STATES.SHOOTING))); new Trigger(coPilot::getAButton).whileTrue(new AmpShot(flywheel, pivot) .deadlineWith(leds.enableState(LED_STATES.SHOOTING))); new Trigger(coPilot::getRightBumper) diff --git a/src/main/java/frc/robot/command/shoot/AutonCand/CandLine.java b/src/main/java/frc/robot/command/shoot/AutonCand/Cand35.java similarity index 91% rename from src/main/java/frc/robot/command/shoot/AutonCand/CandLine.java rename to src/main/java/frc/robot/command/shoot/AutonCand/Cand35.java index 589c98a4..0c1c5c84 100644 --- a/src/main/java/frc/robot/command/shoot/AutonCand/CandLine.java +++ b/src/main/java/frc/robot/command/shoot/AutonCand/Cand35.java @@ -7,7 +7,7 @@ import frc.robot.subsystems.Pivot; import frc.robot.subsystems.Indexer; -public class CandLine extends Command { +public class Cand35 extends Command { private final Flywheel flywheel; private final Pivot pivot; @@ -26,7 +26,7 @@ public class CandLine extends Command { * @param pivot subsystem * @param indexer subsystem */ - public CandLine(Flywheel flywheel, Pivot pivot, Indexer indexer) { + public Cand35(Flywheel flywheel, Pivot pivot, Indexer indexer) { this.flywheel = flywheel; this.pivot = pivot; this.indexer = indexer; @@ -71,6 +71,6 @@ public void end(boolean interrupted) { @Override public boolean isFinished() { - return shot && startTime - shotTime >= CandConstants.TIME_TO_SHOOT; + return indexer.hasShot(); } }