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