From c7777a7925f915b7b518ca958fc6de8cbee6b372 Mon Sep 17 00:00:00 2001 From: lpd20 Date: Wed, 4 Dec 2024 17:10:05 -0500 Subject: [PATCH] chore: formatting, removed test autos --- .../deploy/pathplanner/autos/New Auto.auto | 19 ------------------- src/main/deploy/pathplanner/settings.json | 4 +++- src/main/java/frc/robot/RobotContainer.java | 16 ++++------------ .../frc/robot/subsystems/PivotSubsystem.java | 17 +++++++---------- 4 files changed, 14 insertions(+), 42 deletions(-) delete mode 100644 src/main/deploy/pathplanner/autos/New Auto.auto diff --git a/src/main/deploy/pathplanner/autos/New Auto.auto b/src/main/deploy/pathplanner/autos/New Auto.auto deleted file mode 100644 index b3197af..0000000 --- a/src/main/deploy/pathplanner/autos/New Auto.auto +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "2025.0", - "command": { - "type": "sequential", - "data": { - "commands": [ - { - "type": "path", - "data": { - "pathName": "Test Path" - } - } - ] - } - }, - "resetOdom": true, - "folder": null, - "choreoAuto": false -} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/settings.json b/src/main/deploy/pathplanner/settings.json index 726b984..c1eb962 100644 --- a/src/main/deploy/pathplanner/settings.json +++ b/src/main/deploy/pathplanner/settings.json @@ -2,7 +2,9 @@ "robotWidth": 0.648, "robotLength": 0.648, "holonomicMode": true, - "pathFolders": [], + "pathFolders": [ + "New Folder" + ], "autoFolders": [ "New Folder" ], diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 367ab19..46f662a 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,7 +6,6 @@ import com.pathplanner.lib.auto.AutoBuilder; import com.pathplanner.lib.auto.NamedCommands; - import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; @@ -81,10 +80,7 @@ public RobotContainer() { */ private void configureBindings() { - driverXbox - .a() - .onTrue( - pivot.pivotDown()); + driverXbox.a().onTrue(pivot.pivotDown()); driverXbox.x().onTrue(pivot.pivotUp()); driverXbox .b() @@ -96,14 +92,10 @@ private void configureBindings() { driverXbox.start().whileTrue(Commands.none()); driverXbox.back().whileTrue(Commands.none()); driverXbox.leftBumper().whileTrue(Commands.runOnce(drivebase::lock, drivebase).repeatedly()); - driverXbox - .leftTrigger() - .whileTrue(intake.intakeBucket()); - driverXbox - .rightTrigger() - .whileTrue(intake.outtakeBucket()); + driverXbox.leftTrigger().whileTrue(intake.intakeBucket()); + driverXbox.rightTrigger().whileTrue(intake.outtakeBucket()); driverXbox.rightBumper().onTrue(Commands.none()); - drivebase.setDefaultCommand( + drivebase.setDefaultCommand( !RobotBase.isSimulation() ? driveFieldOrientedAnglularVelocity : driveFieldOrientedDirectAngleSim); diff --git a/src/main/java/frc/robot/subsystems/PivotSubsystem.java b/src/main/java/frc/robot/subsystems/PivotSubsystem.java index 6cafefb..ef20e62 100644 --- a/src/main/java/frc/robot/subsystems/PivotSubsystem.java +++ b/src/main/java/frc/robot/subsystems/PivotSubsystem.java @@ -57,9 +57,6 @@ public PivotSubsystem() { pivotMotor.burnFlash(); } - - - @Override public void useOutput(double output, TrapezoidProfile.State setpoint) { // Use the output (and optionally the setpoint) here @@ -79,18 +76,18 @@ public void set(double speed) { public Command pivotDown() { return Commands.runOnce( () -> { - setGoal(PivotConstants.PIVOT_MIN.in(Degrees)); - enable(); - SmartDashboard.putNumber("Encoder Position in Command", getPosition().in(Degrees)); + setGoal(PivotConstants.PIVOT_MIN.in(Degrees)); + enable(); + SmartDashboard.putNumber("Encoder Position in Command", getPosition().in(Degrees)); }); } public Command pivotUp() { return Commands.runOnce( () -> { - setGoal(PivotConstants.PIVOT_MAX.in(Degrees)); - enable(); - SmartDashboard.putNumber("Pivot Position (Degrees)", getPosition().in(Degrees)); + setGoal(PivotConstants.PIVOT_MAX.in(Degrees)); + enable(); + SmartDashboard.putNumber("Pivot Position (Degrees)", getPosition().in(Degrees)); }); } @@ -104,7 +101,7 @@ public Measure getPosition() { return Degree.of((position / PivotConstants.GEAR_RATIO) * 360); } - public double getEncoderValues() { //returns pure encoder values + public double getEncoderValues() { // returns pure encoder values return getPosition().in(Degrees); } }