Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/profiling' into triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaldez7206 committed Sep 29, 2024
2 parents b509274 + 616dc06 commit f484075
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
16 changes: 7 additions & 9 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static final class Mod0 {
public static final int angleMotorID = 51;
public static final int canCoderID = 4;
// public static final Rotation2d angleOffset = Rotation2d.fromDegrees(183.955078125);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(-0.004395 + 0.5);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(-0.496826);

}

Expand All @@ -291,7 +291,7 @@ public static final class Mod1 {
public static final int angleMotorID = 40;
public static final int canCoderID = 2;
// public static final Rotation2d angleOffset = Rotation2d.fromDegrees(325.01953125);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(0.415527 + 0.5);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(0.405518 + 0.5);

}

Expand All @@ -303,7 +303,7 @@ public static final class Mod2 {
public static final int angleMotorID = 9;
public static final int canCoderID = 1;
// public static final Rotation2d angleOffset = Rotation2d.fromDegrees(124.62890625);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(-0.145264 + 0.5);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(0.348145);

}

Expand All @@ -315,7 +315,7 @@ public static final class Mod3 {
public static final int angleMotorID = 8;
public static final int canCoderID = 10;
// public static final Rotation2d angleOffset = Rotation2d.fromDegrees(295.400390625);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(0.323730 + 0.5);
public static final Rotation2d angleOffset = Rotation2d.fromRotations(0.317627 + 0.5);
}

public static final HolonomicPathFollowerConfig pathFollowerConfig =
Expand Down Expand Up @@ -370,10 +370,8 @@ public static final class AutoConstants {
*/
public static final class ElevatorWristConstants {

public static final Rotation2d WRIST_REF_1_ANGLE_MEASURED =
Rotation2d.fromRotations(0.6225);
public static final Rotation2d WRIST_REF_2_ANGLE_MEASURED =
Rotation2d.fromRotations(0.7434);
public static final Rotation2d WRIST_REF_1_ANGLE_MEASURED = Rotation2d.fromRotations(0.454);
public static final Rotation2d WRIST_REF_2_ANGLE_MEASURED = Rotation2d.fromRotations(0.585);
public static final Rotation2d WRIST_REF_1_ANGLE_ACTUAL = Rotation2d.fromDegrees(0.0);
public static final Rotation2d WRIST_REF_2_ANGLE_ACTUAL = Rotation2d.fromDegrees(45.0);

Expand Down Expand Up @@ -450,7 +448,7 @@ public static final class SetPoints {
public static final Rotation2d HOME_ANGLE = Rotation2d.fromDegrees(5);
// public static final double AMP_HEIGHT = Units.inchesToMeters(34);
public static final double AMP_HEIGHT = 43.5;
public static final Rotation2d AMP_ANGLE = Rotation2d.fromDegrees(-38);
public static final Rotation2d AMP_ANGLE = Rotation2d.fromDegrees(-29.95);
// public static final double TRAP_HEIGHT = Units.inchesToMeters(40);
public static final double TRAP_HEIGHT = 44;
public static final Rotation2d TRAP_ANGLE = Rotation2d.fromDegrees(-10);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private void configureButtonBindings() {
driver.rightTrigger()
.whileTrue(CommandFactory.newIntakeCommand(intake, indexer, elevatorWrist));
// intake backward
driver.leftTrigger()
driver.leftTrigger().and(elevatorWrist.wristReverseOutakeLimit)
.whileTrue(CommandFactory.runIntakeMotorNonStop(intake, indexer, -1, -.20));

/* Operator Buttons */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/P8765.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public P8765(Swerve swerveDrive, ElevatorWrist elevatorWrist, Intake intake, Sho
Command part0 = followPath0
.alongWith(
elevatorWrist.goToPosition(Constants.ElevatorWristConstants.SetPoints.HOME_HEIGHT,
Rotation2d.fromDegrees(28.0)).withTimeout(1.5))
Rotation2d.fromDegrees(31.0)).withTimeout(1.5))
.andThen(Commands.waitSeconds(.1)).andThen(CommandFactory.Auto.runIndexer(intake));
// .andThen(Commands.either(elevatorWrist.homePosition().withTimeout(.5), Commands.none(),
// dumpOrNot));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class ElevatorWrist extends SubsystemBase {

public Trigger elevatorAtHome = new Trigger(() -> elevatorAtHome());
public Trigger elevatorAtAmp = new Trigger(() -> elevatorAtAmp());
public Trigger wristReverseOutakeLimit =
new Trigger(() -> getWristAngle().getDegrees() <= 24.0);

/**
* Create new ElevatorWrist.
Expand Down Expand Up @@ -279,7 +281,7 @@ public void setWristAngle(Rotation2d angle) {
*/
public Command speakerPreset() {
return goToPosition(Constants.ElevatorWristConstants.SetPoints.HOME_HEIGHT,
Rotation2d.fromDegrees(34.1)).withTimeout(2);
Rotation2d.fromDegrees(37.5)).withTimeout(2);
}

/**
Expand Down

0 comments on commit f484075

Please sign in to comment.