Conversation
| SmartShuffleboard.putCommand("Drivetrain", "Move Right 1ft", CommandUtil.logged(new MoveDistance(drivetrain, 0, -0.3048, 0.4))); | ||
| SmartShuffleboard.putCommand("Drivetrain", "Move Left + Forward 1ft", CommandUtil.logged(new MoveDistance(drivetrain, 0.3048, 0.3048, 0.4))); | ||
|
|
||
| SmartShuffleboard.putCommand("Drivetrain", "Move Forward 1ft", CommandUtil.logged(new MoveDistance(drivetrain, 0.3048, 0, 0.4, false))); |
There was a problem hiding this comment.
Keep these field centric or make copies that are field centic if you want both
| private TimeoutCounter timeoutCounter = new TimeoutCounter("Move Distance"); | ||
|
|
||
| public MoveDistance(SwerveDrivetrain drivetrain, double changeXMeters, double changeYMeters, double maxSpeed) { | ||
| public MoveDistance(SwerveDrivetrain drivetrain, double changeXMeters, double changeYMeters, double maxSpeed, boolean fieldCentric) { |
There was a problem hiding this comment.
Why take in a fieldCentric boolean if you don't even use it?
| public static final double RAMP_ERROR_RANGE = 0.00; | ||
| public static final double RAMP_POS = 0.0; | ||
| public static final int RAMP_ID = 45; | ||
| public static final double RAMP_ANGLE = 15.0; |
There was a problem hiding this comment.
This belongs in Game Constants
| public class CrossLine extends ParallelCommandGroup { | ||
| double direction; | ||
| public CrossLine(SwerveDrivetrain drivetrain, Ramp ramp) { | ||
| if (RobotContainer.isRedAlliance() == true) { |
There was a problem hiding this comment.
Can be simplified with a ternary operator or by eliminating == true and replacing == false with !
direction = RobotContainer.isRedAlliance() ? -1.715 : 1.715
|
|
||
| public class ShootCrossLeft extends SequentialCommandGroup{ | ||
| public ShootCrossLeft(SwerveDrivetrain drivetrain, Shooter shooter, Ramp ramp, IntakeSubsystem intake, Feeder feeder) { | ||
| double direction = 1.0; |
There was a problem hiding this comment.
Similar to above can use ternary operator
| public class ShootCrossMid extends SequentialCommandGroup{ | ||
| public ShootCrossMid(SwerveDrivetrain drivetrain, Shooter shooter, Ramp ramp, IntakeSubsystem intake, Feeder feeder) { | ||
| double direction = 1.0; | ||
| if (RobotContainer.isRedAlliance() == true) { |
There was a problem hiding this comment.
Similar to above can use ternary operator
| public class ShootCrossRight extends SequentialCommandGroup{ | ||
| public ShootCrossRight(SwerveDrivetrain drivetrain, Shooter shooter, Ramp ramp, IntakeSubsystem intake, Feeder feeder) { | ||
| double direction = 1.0; | ||
| if (RobotContainer.isRedAlliance() == true) { |
There was a problem hiding this comment.
Similar to above can use ternary operator
| Map.entry(new AutoEvent(AutoAction.ShootAndCross, FieldLocation.SpeakerRight), AutoBuilder.followPath(PathPlannerPath.fromPathFile("ShootAndCrossRight")).beforeStarting(new ShootAndDrop(shooter,feeder,deployer,ramp))), | ||
| Map.entry(new AutoEvent(AutoAction.ShootAndCross, FieldLocation.SpeakerLeft), AutoBuilder.followPath(PathPlannerPath.fromPathFile("ShootAndCrossLeft")).beforeStarting(new ShootAndDrop(shooter,feeder,deployer,ramp))), | ||
| Map.entry(new AutoEvent(AutoAction.ShootAndCross, FieldLocation.SpeakFront), AutoBuilder.followPath(PathPlannerPath.fromPathFile("ShootAndCrossMid")).beforeStarting(new ShootAndDrop(shooter,feeder,deployer,ramp))), | ||
| Map.entry(new AutoEvent(AutoAction.ShootCross, FieldLocation.SpeakFront), new ShootCrossMid(drivetrain, shooter, ramp, intakeSubsystem, feeder)), |
There was a problem hiding this comment.
Don't replace the paths from PathPlanner, just make a new entry with ShootAndCrossManual as it's name, do this for all your autos
There was a problem hiding this comment.
Lest the mentors tell you to do so.
|
Can I close this pr? It doesn't look like it's being updated nor do I see a real use for it. |
No description provided.