- corrected Driving/Counting status

This commit is contained in:
zolliker
2005-03-30 13:22:15 +00:00
parent 0a8ca9dcab
commit 21a54358e6

View File

@ -357,6 +357,7 @@
pICountable pCountInt = NULL; pICountable pCountInt = NULL;
pIDrivable pDrivInt = NULL; pIDrivable pDrivInt = NULL;
int eCode; int eCode;
int isCounting=0, isDriving=0;
assert(self); assert(self);
@ -449,17 +450,13 @@
} }
break; break;
case HWBusy: case HWBusy:
if(pCountInt != NULL && pDrivInt != NULL) if(pCountInt != NULL)
{ {
SetStatus(eCountDrive); isDriving = 1;
} }
else if(pCountInt != NULL && pDrivInt == NULL) if(pDrivInt == NULL)
{ {
SetStatus(eCounting); isCounting = 1;
}
else if(pDrivInt != NULL && pCountInt == NULL)
{
SetStatus(eDriving);
} }
self->iStatus = DEVBUSY; self->iStatus = DEVBUSY;
break; break;
@ -483,6 +480,16 @@
iRet = LLDnodePtr2Next(self->iList); iRet = LLDnodePtr2Next(self->iList);
} }
if (isCounting) {
if (isDriving) {
SetStatus(eCountDrive);
} else {
SetStatus(eCounting);
}
} else if (isDriving) {
SetStatus(eDriving);
}
iRet = LLDnodePtr2First(self->iList); iRet = LLDnodePtr2First(self->iList);
if(LLDcheck(self->iList) == LIST_EMPTY) if(LLDcheck(self->iList) == LIST_EMPTY)
{ {