The monitor last value field needs to be initialized.

Device support init_record is allowed to set VAL to 1.
If uninitialized then mlst is 0.
During the first process() this will miss a monitor if VAL is changed to 0,
and cause a spurious monitor if VAL remains 1.

- mdavidsaver
This commit is contained in:
Andrew Johnson
2010-03-24 13:21:38 -05:00
parent 3b0036b389
commit e56d4c2337

View File

@@ -171,6 +171,7 @@ static long init_record(boRecord *prec,int pass)
prec->udf = FALSE;
} else if (status==2) status=0;
}
prec->mlst = prec->val;
/* convert val to rval */
if ( prec->mask != 0 ) {
if(prec->val==0) prec->rval = 0;