- A couple of small fixes for memory and initialization problems.
This is to make valgrind happy SKIPPED: psi/amorscan.c psi/el734hp.c psi/psi.c psi/tasscan.c
This commit is contained in:
10
oscillate.c
10
oscillate.c
@ -49,6 +49,16 @@ static int OscillationTask(void *data){
|
||||
errStatus = self->pMot->pDriver->TryAndFixIt(self->pMot->pDriver,code,pos);
|
||||
self->errorCount++;
|
||||
if(errStatus == MOTFAIL){
|
||||
/*
|
||||
try driving the other way on a serious error
|
||||
*/
|
||||
if(self->nextTargetFlag == 1){
|
||||
pos = self->upperLimit;
|
||||
self->nextTargetFlag = 0;
|
||||
} else {
|
||||
pos = self->lowerLimit;
|
||||
self->nextTargetFlag = 1;
|
||||
}
|
||||
MotorRun(self->pMot,self->pCon,pos);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user