All existing manipulations of UDF in process() are removed and one udf is set FALSE when the raw value is successfully read.

This commit is contained in:
Marty Kraimer
2002-03-08 15:26:19 +00:00
parent a778863602
commit 87bfe60ee7

View File

@@ -205,15 +205,14 @@ static long process(pmbbi)
short i;
unsigned long rval = pmbbi->rval;
pmbbi->udf = FALSE;
if(pmbbi->shft>0) rval >>= pmbbi->shft;
if (pmbbi->sdef){
pstate_values = &(pmbbi->zrvl);
pmbbi->val = 65535; /* initalize to unknown state*/
pmbbi->udf = TRUE;
for (i = 0; i < 16; i++){
if (*pstate_values == rval){
pmbbi->val = i;
pmbbi->udf = FALSE;
break;
}
pstate_values++;
@@ -221,7 +220,6 @@ static long process(pmbbi)
}else{
/* the raw value is the desired value */
pmbbi->val = (unsigned short)rval;
pmbbi->udf = FALSE;
}
}
else if(status == 2) status = 0;