Zeroing rotary encoder motor steps fix
This commit is contained in:
@ -236,6 +236,8 @@ class GalilMotor(object):
|
|||||||
self.accel = max(1, abs(int(arg)))
|
self.accel = max(1, abs(int(arg)))
|
||||||
elif cmd == "DC":
|
elif cmd == "DC":
|
||||||
self.decel = max(1, abs(int(arg)))
|
self.decel = max(1, abs(int(arg)))
|
||||||
|
elif cmd == "DP":
|
||||||
|
self.currentSteps = int(arg)
|
||||||
else:
|
else:
|
||||||
print "Unknown assignment", cmd, arg
|
print "Unknown assignment", cmd, arg
|
||||||
|
|
||||||
|
@ -2648,6 +2648,7 @@ static void DMCState_MotorStart(pDMC2280Driv self, pEvtEvent event) {
|
|||||||
cmdStatus(self);
|
cmdStatus(self);
|
||||||
self->status_valid = false;
|
self->status_valid = false;
|
||||||
self->subState = 4;
|
self->subState = 4;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (self->subState == 4) { /* Status after Zero */
|
else if (self->subState == 4) { /* Status after Zero */
|
||||||
int iRet;
|
int iRet;
|
||||||
@ -2660,6 +2661,7 @@ static void DMCState_MotorStart(pDMC2280Driv self, pEvtEvent event) {
|
|||||||
set_lastMotion(self, self->currSteps, self->currCounts);
|
set_lastMotion(self, self->currSteps, self->currCounts);
|
||||||
cmdOn(self);
|
cmdOn(self);
|
||||||
self->subState = 1;
|
self->subState = 1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user