Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 58f3c94

Browse files
committed
tuning changes
1 parent 95fc8c2 commit 58f3c94

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/main/java/frc/robot/subsystems/Coral.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public class Coral extends SubsystemBase {
2727

2828
// rotations for levels
2929
private Rotation2d[] coralScoringRotations = {
30-
Rotation2d.fromDegrees(60),
31-
Rotation2d.fromRadians(5.97),
32-
Rotation2d.fromRadians(6.02),
33-
Rotation2d.fromDegrees(64.0)
30+
Rotation2d.fromRadians(1),
31+
Rotation2d.fromRadians(1.7),
32+
Rotation2d.fromRadians(1.7),
33+
Rotation2d.fromRadians(0.3)
3434
};
3535
private Rotation2d[] reefClearRotationsPrimary = {
3636
Rotation2d.fromDegrees(-35), Rotation2d.fromDegrees(-35)
@@ -44,7 +44,7 @@ public Coral() {
4444
movementController.setTolerance(CoralConfig.POSITION_TOLERANCE, CoralConfig.VELOCITY_TOLERANCE);
4545
movementController.enableContinuousInput(-Math.PI, Math.PI);
4646
elevator.setDefaultCommand(elevator.setElevatorHeight(() -> 0.0));
47-
coralPivot.setDefaultCommand(coralPivot.setPivotAngle(() -> Rotation2d.fromDegrees(75)));
47+
coralPivot.setDefaultCommand(coralPivot.setPivotAngle(() -> Rotation2d.fromRadians(0.35)));
4848
grabber.setDefaultCommand(
4949
Commands.run(
5050
() -> {
@@ -62,6 +62,7 @@ private Command score(int idx, BooleanSupplier completeScore) {
6262
return Commands.waitSeconds(0.3)
6363
.andThen(coralPivot.setPivotAngle(() -> coralScoringRotations[idx]))
6464
.alongWith(elevator.setElevatorHeight(() -> elevatorScoringHeights[idx]))
65+
.alongWith(Commands.run(grabber::run, grabber))
6566
.withDeadline(
6667
Commands.waitUntil(elevator::isAtPosition)
6768
.andThen(Commands.waitUntil(coralPivot::isPivotReady), Commands.waitSeconds(0.8))
@@ -111,7 +112,7 @@ public Command l4Score(BooleanSupplier completeScore, boolean shouldHaveAutoTime
111112
if (elevator.getPosition() > 1.0 || shouldComplete) {
112113
return coralScoringRotations[3];
113114
} else {
114-
return coralScoringRotations[3].minus(Rotation2d.fromDegrees(15));
115+
return coralScoringRotations[3].plus(Rotation2d.fromDegrees(15));
115116
}
116117
})
117118
.alongWith(

src/main/java/frc/robot/subsystems/CoralGrabber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ public void stop() {
8585
} // Stops motor
8686

8787
public void run() {
88-
motor.set(0.1);
88+
motor.set(0.2);
8989
} // Sets motor speed to (roughly) 10% of max
9090
}

src/main/java/frc/robot/subsystems/Elevator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public Elevator() {
4141
elevator.configure(
4242
new SparkFlexConfig()
4343
.smartCurrentLimit(ElevatorConfig.ELEVATOR_CURRENT_LIMIT)
44-
.idleMode(ElevatorConfig.ELEVATOR_IDLE_MODE).inverted(false)
44+
.idleMode(ElevatorConfig.ELEVATOR_IDLE_MODE)
45+
.inverted(false)
4546
.apply(
4647
new EncoderConfig()
4748
.positionConversionFactor(ElevatorConfig.ENCODER_POSITION_CONVERSION_FACTOR)

0 commit comments

Comments
 (0)