Skip to content

Commit 1df7b0e

Browse files
committed
Merge branch 'main' of https://github.com/frc3512/BK-2025
2 parents 30a9b80 + e9da623 commit 1df7b0e

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/main/java/frc/robot/subsystems/algaeIntake/AlgaeIntakeConstants.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ public class AlgaeIntakeConstants {
4747
.withClosedLoopGeneral(new ClosedLoopGeneralConfigs().withContinuousWrap(true))
4848
.withMotionMagic(
4949
new MotionMagicConfigs() // Example Values Only Needs Tuning
50-
.withMotionMagicCruiseVelocity(360d / 360d) // 360 degrees per second
51-
.withMotionMagicAcceleration(1080d / 360d) // 1080 degrees per second squared
50+
.withMotionMagicCruiseVelocity(0) // 360 degrees per second
51+
.withMotionMagicAcceleration(0) // 1080 degrees per second square
5252
)
53-
.withSlot0(new Slot0Configs().withKP(1)) // Example Values Only Needs Tuning
53+
.withSlot0(new Slot0Configs()
54+
.withKP(0)
55+
.withKG(0)
56+
.withKD(0)) // Example Values Only Needs Tuning
5457
.withCurrentLimits(
5558
new CurrentLimitsConfigs()
5659
.withSupplyCurrentLimit(40)

src/main/java/frc/robot/subsystems/algaeIntake/AlgaeIntakeIO_Real.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ public AlgaeIntakeIO_Real() {
5656

5757
pivotMotor.optimizeBusUtilization();
5858
wheelsMotor.optimizeBusUtilization();
59-
pivotMotor.setPosition(pivotEncoder.getAbsPosition());
59+
pivotMotor.setPosition(getAbsEncoderDeg() / 360);
60+
}
61+
62+
public final double getAbsEncoderDeg() {
63+
return ((360.0 * pivotEncoder.getAbsPosition() + 180) % 360.0) - 180.0;
6064
}
6165

6266
@Override

0 commit comments

Comments
 (0)