status returns busy when motor controller still continues M.Z.

This commit is contained in:
cvs
2004-11-04 08:08:03 +00:00
parent 1b1ce73d1c
commit d96ee44d42

View File

@ -146,7 +146,7 @@ static int EL734Run(void *pData,float fValue){
}
/*-----------------------------------------------------------------------*/
static int decodeMSR(pEL734Driv self, int msr){
if(msr == 0){
if (msr == 0){
/*
we are done: check ored_msr for troubles
*/
@ -162,7 +162,7 @@ static int decodeMSR(pEL734Driv self, int msr){
self->errorCode = RUNFAULT;
return HWPosFault;
} else if(self->oredMsr & 0x200){
self->errorCode = RUNFAULT;
self->errorCode = POSFAULT;
return HWPosFault;
} else if(self->oredMsr & 0x1000){
self->errorCode = BADCUSHION;
@ -179,11 +179,18 @@ static int decodeMSR(pEL734Driv self, int msr){
} else if(self->oredMsr & 0x400){
self->errorCode = POSFAULT;
return HWFault;
} else {
self->errorCode = BADUNKNOWN;
return HWFault; /* should not happen */
}
} else {
/*
we are still tugging along ............
*/
return HWBusy;
/* inserted above line and commented out lines below M.Zolliker Sep 2004
we do not stop when a minor error message occurs, but treat these with oredMsr
if(msr & 0x10){
self->errorCode = LOWLIM;
return HWFault;
@ -193,8 +200,8 @@ static int decodeMSR(pEL734Driv self, int msr){
} else if(msr & 0x80){
self->errorCode = RUNFAULT;
return HWPosFault;
} else if(self->oredMsr & 0x200){
self->errorCode = RUNFAULT;
} else if(msr & 0x200){
self->errorCode = POSFAULT;
return HWPosFault;
} else if(msr & 0x1000){
self->errorCode = BADCUSHION;
@ -214,6 +221,7 @@ static int decodeMSR(pEL734Driv self, int msr){
} else {
return HWBusy;
}
*/
}
}
/*------------------------------------------------------------------------*/