Skip to content

Commit

Permalink
chore: formatting, removed test autos
Browse files Browse the repository at this point in the history
  • Loading branch information
RealSirLancelot committed Dec 4, 2024
1 parent 0374441 commit c7777a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 42 deletions.
19 changes: 0 additions & 19 deletions src/main/deploy/pathplanner/autos/New Auto.auto

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/deploy/pathplanner/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"robotWidth": 0.648,
"robotLength": 0.648,
"holonomicMode": true,
"pathFolders": [],
"pathFolders": [
"New Folder"
],
"autoFolders": [
"New Folder"
],
Expand Down
16 changes: 4 additions & 12 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
Expand All @@ -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);
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/frc/robot/subsystems/PivotSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
});
}

Expand All @@ -104,7 +101,7 @@ public Measure<Angle> 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);
}
}

0 comments on commit c7777a7

Please sign in to comment.