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:
@@ -593,8 +593,11 @@ static int motCreep(pDMC2280Driv self, double target) {
|
||||
offset = offset - fabs(self->stepsPerX * self->creep_offset);
|
||||
else {
|
||||
/* if closer than one count, single step else go half way */
|
||||
if (offset <= fabs(self->stepsPerX / self->cntsPerX))
|
||||
offset = 1;
|
||||
if (offset <= fabs(self->stepsPerX / self->cntsPerX)) {
|
||||
offset = offset / 10;
|
||||
if (offset < 1)
|
||||
offset = 1;
|
||||
}
|
||||
else
|
||||
offset = offset / 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user