- Extended confvirtmot to allow for sequences of calls
- Extended confvirtmot to have a checkscript - Made sure that targets get updated when calling tasdrive - Fixed some output codes in tasdrive.c - Made tdchm invoke counters event message for Melone - Fixed the ConID inefficiency by caching the host name in asynnet.c - Added a traceActive function to trace SKIPPED: psi/tdchm.c
This commit is contained in:
9
motor.c
9
motor.c
@ -364,6 +364,7 @@ static void finishDriving(pMotor self, SConnection * pCon)
|
||||
InvokeCallBack(self->pCall, MOTDRIVE, &sCall); /* send also very last position */
|
||||
InvokeCallBack(self->pCall, MOTEND, &sCall);
|
||||
tracePar(self->name,"%f",sCall.fVal);
|
||||
self->running = 0;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
@ -484,6 +485,10 @@ static int MotorStatus(void *sulf, SConnection * pCon)
|
||||
assert(sulf);
|
||||
self = (pMotor) sulf;
|
||||
|
||||
if(self->running != 1){
|
||||
return HWIdle;
|
||||
}
|
||||
|
||||
status = evaluateStatus(self, pCon);
|
||||
if (self->pDrivInt->drivableStatus != status) {
|
||||
((SConnection *) pCon)->conEventType = STATUS;
|
||||
@ -752,10 +757,12 @@ static long MotorRunImpl(void *sulf, SConnection * pCon, float fNew)
|
||||
case MOTREDO:
|
||||
iRet = self->pDriver->RunTo(self->pDriver, fHard);
|
||||
if (iRet == OKOK) {
|
||||
self->running = 1;
|
||||
return OKOK;
|
||||
}
|
||||
break;
|
||||
case MOTOK:
|
||||
self->running = 1;
|
||||
return OKOK;
|
||||
break;
|
||||
}
|
||||
@ -766,6 +773,7 @@ static long MotorRunImpl(void *sulf, SConnection * pCon, float fNew)
|
||||
SCSetInterrupt(pCon, (int) ObVal(self->ParArray, INT));
|
||||
return HWFault;
|
||||
}
|
||||
self->running = 1;
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
@ -1109,6 +1117,7 @@ void MotorReset(pMotor pM)
|
||||
usUser);
|
||||
ObParInit(pM->ParArray, SZERO, "softzero", ZEROINACTIVE, usUser);
|
||||
ObParInit(pM->ParArray, FIX, "fixed", -1, usUser);
|
||||
pM->running = 0;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user