File tree Expand file tree Collapse file tree
src/main/java/frc/robot/subsystems/algaeIntake Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments