Skip to content

Commit 07ba4db

Browse files
committed
Fixes issue stopping motor when no steps are left
1 parent 7d1a0bf commit 07ba4db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/StepControlBase.h

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ namespace TeensyStep
156156
{
157157
uint32_t newTarget = accelerator.initiateStopping(this->leadMotor->current);
158158
this->leadMotor->target = this->leadMotor->current + this->leadMotor->dir * newTarget;
159+
160+
if (this->leadMotor->target == this->leadMotor->current) this->timerField.end();
159161
}
160162
}
161163

0 commit comments

Comments
 (0)