Skip to content

Commit

Permalink
COMP States - Q74
Browse files Browse the repository at this point in the history
  • Loading branch information
MattD8957 committed Apr 5, 2024
1 parent 4b9c5e8 commit 0cd7d88
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/autos/3-SB-[F5-F4]-EF.auto
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{
"type": "named",
"data": {
"name": null
"name": "Stop-Flywheel"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/autos/4-SB-[C3-C2-F3]-EC.auto
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
{
"type": "named",
"data": {
"name": "Smart-Shoot"
"name": "Cand-3.5"
}
},
{
Expand Down Expand Up @@ -159,7 +159,7 @@
{
"type": "named",
"data": {
"name": "Smart-Shoot"
"name": "Cand-3.5"
}
},
{
Expand Down Expand Up @@ -253,7 +253,7 @@
{
"type": "named",
"data": {
"name": "Smart-Shoot"
"name": "Cand-3.5"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/BB-C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/BF-C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/C2-C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/C3-C2.path
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/C3-F1.path
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/C3-F2.path
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/C3-F3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/Linked Point.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/SB-C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/SF-C3.path
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -71,6 +71,6 @@ public void end(boolean interrupted) {

@Override
public boolean isFinished() {
return shot && startTime - shotTime >= CandConstants.TIME_TO_SHOOT;
return indexer.hasShot();
}
}

0 comments on commit 0cd7d88

Please sign in to comment.