Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/AccelStepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ void AccelStepper::computeNewSpeed()
// returns true if the motor is still running to the target position.
boolean AccelStepper::run()
{
if (runSpeed())
if (runSpeed()){
computeNewSpeed();
}else{
return false;
}
return _speed != 0.0 || distanceToGo() != 0;
}

Expand Down