-
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.
- this is the current code for competition at Waterbury
- Loading branch information
1 parent
b4ee759
commit b064743
Showing
8 changed files
with
119 additions
and
100 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
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
package frc.robot.commands.auto; | ||
|
||
import com.pathplanner.lib.commands.PathPlannerAuto; | ||
|
||
import edu.wpi.first.math.geometry.Pose2d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.Commands; | ||
import frc.robot.commands.AutoCommand; | ||
import frc.robot.commands.Autos; | ||
|
||
public class NothingAuto extends AutoCommand { | ||
|
||
|
||
|
||
public NothingAuto() { | ||
addCommands(Commands.print("Nothing auto has finished running.")); | ||
} | ||
|
||
@Override | ||
public Pose2d getStartPose() { | ||
return super.getStartPose(); | ||
return Autos.getPathPlannerTrajectory("Get Mid Note", Rotation2d.fromDegrees(0)).getInitialPose(); | ||
} | ||
} |
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,21 @@ | ||
package frc.robot.commands.auto; | ||
|
||
import edu.wpi.first.math.geometry.Pose2d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import frc.robot.commands.AutoCommand; | ||
import frc.robot.commands.Autos; | ||
import frc.robot.subsystems.shooter.Shooter; | ||
|
||
public class ShootOnly extends AutoCommand { | ||
public ShootOnly(Shooter shooter) { | ||
addCommands( | ||
Autos.runSpeakerShot(shooter) | ||
); | ||
addRequirements(shooter); | ||
} | ||
|
||
@Override | ||
public Pose2d getStartPose() { | ||
return Autos.getPathPlannerTrajectory("Get Mid Note", Rotation2d.fromDegrees(180)).getInitialPose(); | ||
} | ||
} |
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,32 @@ | ||
package frc.robot.commands.auto; | ||
|
||
import edu.wpi.first.math.geometry.Pose2d; | ||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.Commands; | ||
import edu.wpi.first.wpilibj2.command.WaitCommand; | ||
import frc.robot.commands.AutoCommand; | ||
import frc.robot.commands.Autos; | ||
import frc.robot.subsystems.shooter.Shooter; | ||
import frc.robot.subsystems.swerve.SwerveDrive; | ||
|
||
public class SpeakerBack extends AutoCommand { | ||
public SpeakerBack(SwerveDrive swerve, Shooter shooter) { | ||
addCommands( | ||
Autos.runSpeakerShot(shooter), | ||
new WaitCommand(1), | ||
Commands.runOnce(() -> { | ||
swerve.rawDriveInputs(0, -2, 0, false, false); | ||
}, swerve), | ||
new WaitCommand(0.7), | ||
Commands.runOnce(() -> { | ||
swerve.rawDriveInputs(0, 0, 0, false, false); | ||
}, swerve) | ||
); | ||
addRequirements(swerve, shooter); | ||
} | ||
|
||
@Override | ||
public Pose2d getStartPose() { | ||
return Autos.getPathPlannerTrajectory("Get Mid Note", Rotation2d.fromDegrees(180)).getInitialPose(); | ||
} | ||
} |
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