Skip to content

Commit 10dc79c

Browse files
authored
Merge pull request #367 from 94xhn/fix-movetimed-131072-boundary
Fix off-by-one in moveTimed() duration chunking at 131072 boundary
2 parents e4b67ef + 4133a72 commit 10dc79c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/FastAccelStepper.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ MoveTimedResultCode FastAccelStepper::moveTimed(int16_t steps,
817817
uint32_t this_duration = rate;
818818
cmd.steps = 1;
819819
while (this_duration) {
820-
if (this_duration > 131072) {
820+
if (this_duration >= 131072) {
821821
cmd.ticks = 65535;
822822
} else if (this_duration > 65535) {
823823
cmd.ticks = this_duration / 2;

0 commit comments

Comments
 (0)