- corrected Driving/Counting status
This commit is contained in:
23
devexec.c
23
devexec.c
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user