Skip to content

Commit

Permalink
Set Spark to desired position once smooth motion is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Aug 30, 2024
1 parent ecd9a14 commit 85de332
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,15 @@ private void handleSmoothMotion() {
);

m_isSmoothMotionEnabled = !isSmoothMotionFinished();

if (!m_isSmoothMotionEnabled) {
set(
m_desiredState.position,
ControlType.kPosition,
m_feedforwardSupplier.apply(m_desiredState),
SparkPIDController.ArbFFUnits.kVoltage
);
}
}

/**
Expand Down

0 comments on commit 85de332

Please sign in to comment.