Creep last encoder count by steps-per-count/10 instead of one, for motors with large steps-per-count

r3544 | dcl | 2012-05-17 11:02:53 +1000 (Thu, 17 May 2012) | 1 line
This commit is contained in:
Douglas Clowes
2012-05-17 11:02:53 +10:00
parent a5d64c28ab
commit b10b1608b2

View File

@@ -593,8 +593,11 @@ static int motCreep(pDMC2280Driv self, double target) {
offset = offset - fabs(self->stepsPerX * self->creep_offset); offset = offset - fabs(self->stepsPerX * self->creep_offset);
else { else {
/* if closer than one count, single step else go half way */ /* if closer than one count, single step else go half way */
if (offset <= fabs(self->stepsPerX / self->cntsPerX)) if (offset <= fabs(self->stepsPerX / self->cntsPerX)) {
offset = 1; offset = offset / 10;
if (offset < 1)
offset = 1;
}
else else
offset = offset / 2; offset = offset / 2;
} }