motor: fixed bug with deferred moves, that was causing axis drift when scanning multi axis groups using deferred moves.

This commit is contained in:
mp49
2011-05-20 16:02:23 +00:00
parent 5eb4b18d5c
commit 2edcb2fcba
+4 -1
View File
@@ -184,6 +184,7 @@ typedef struct motorAxisHandle
PARAMS params;
double currentPosition;
double currentVelocity;
double theoryPosition;
double velocity;
double accel;
double minJerkTime; /* for the SGamma function */
@@ -494,7 +495,7 @@ static int processDeferredMovesInGroup(const XPSController * pController, char *
pAxis->deferred_relative ? (pAxis->currentPosition + pAxis->deferred_position) : pAxis->deferred_position;
} else {
positions[positions_index] =
pAxis->deferred_relative ? 0 : pAxis->currentPosition;
pAxis->deferred_relative ? 0 : pAxis->theoryPosition;
}
/*Reset deferred flag.*/
@@ -1302,6 +1303,8 @@ static void XPSPoller(XPSController *pController)
1,
&theoryPosition);
pAxis->theoryPosition = theoryPosition;
status = GroupPositionCurrentGet(pAxis->pollSocket,
pAxis->positionerName,
1,