Skip to content

Commit

Permalink
fix for roller
Browse files Browse the repository at this point in the history
  • Loading branch information
progfrogs committed Feb 4, 2025
1 parent a7cf588 commit 59540d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/tagalong/subsystems/micro/Roller.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ public void periodic() {
} else if (motorResetConfig()) {
setRollerProfile(getRollerPosition(), 0.0);
_primaryMotor.set(0.0);
} else if (_isFFTuningMicro && _trapProfile.isFinished(_profileTimer.get())) {
_primaryMotor.setControl(_requestedPositionVoltage.withFeedForward(_rollerFF.getKs()));
}

if (_followProfile) {
followLastProfile();
}
Expand Down Expand Up @@ -281,8 +282,8 @@ public double rollerRotToMotor(double rollerRot) {
}

/**
* Calculates the next state according to the trapezoidal profile and requests the roller motor(s)
* to arrive at the next position with feedforward
* Calculates the next state according to the trapezoidal profile and requests the roller
* motor(s) to arrive at the next position with feedforward
*/
public void followLastProfile() {
if (_isMicrosystemDisabled) {
Expand Down

0 comments on commit 59540d8

Please sign in to comment.