Skip to content

Commit

Permalink
Merge branch 'spark-simulation' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Sep 27, 2024
2 parents 172583a + 4ba3251 commit 05f9724
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.revrobotics.SparkPIDController.ArbFFUnits;
import com.revrobotics.SparkRelativeEncoder;

import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.filter.Debouncer;
import edu.wpi.first.math.system.plant.DCMotor;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
Expand Down Expand Up @@ -587,7 +588,7 @@ private void handleSmoothMotion() {
set(
m_smoothMotionState.position,
ControlType.kPosition,
m_feedforwardSupplier.apply(m_smoothMotionState),
MathUtil.clamp(m_feedforwardSupplier.apply(m_smoothMotionState), -MAX_VOLTAGE, +MAX_VOLTAGE),
SparkPIDController.ArbFFUnits.kVoltage
);

Expand Down

0 comments on commit 05f9724

Please sign in to comment.