From 0553fe9dc4b58f46ac3cbbfe26d123597eb80dff Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Fri, 4 Mar 1994 08:28:28 +0000 Subject: [PATCH] Move constant link value to val only if val is zero --- src/dev/devEventSoft.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dev/devEventSoft.c b/src/dev/devEventSoft.c index 2b7e7cb17..8d5fff2f1 100644 --- a/src/dev/devEventSoft.c +++ b/src/dev/devEventSoft.c @@ -32,7 +32,7 @@ * .00 12-13-91 jba Initial definition * .02 03-13-92 jba ANSI C changes * .03 10-10-92 jba replaced code with recGblGetLinkValue call - * .04 03-03-94 mrk Dont move constant link value to val + * .04 03-03-94 mrk Move constant link value to val only if val is zero */ @@ -79,7 +79,9 @@ static long init_record(pevent) /* event.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/ switch (pevent->inp.type) { case (CONSTANT) : - /*User cal initialize val field via DCT*/ + if(pevent->inp.value.value!=0.0 && pevent->val == 0.0){ + pevent->val=pevent->inp.value.value; + } pevent->udf= FALSE; break; case (PV_LINK) :