udf fix when inp is a constant

This commit is contained in:
Janet B. Anderson
1991-06-14 10:54:59 +00:00
parent 58ce439f19
commit 11d1f15159
2 changed files with 6 additions and 3 deletions

View File

@@ -78,6 +78,7 @@ static long init_record(pstringin)
sprintf(pstringin->val,"%-14.7g",pstringin->inp.value.value);
pstringin->udf= FALSE;
}
pstringin->udf= FALSE;
break;
case (PV_LINK) :
break;

View File

@@ -114,8 +114,10 @@ static long init_record(pstringout)
return(S_dev_missingSup);
}
/* get the initial value dol is a constant*/
if (pstringout->dol.type == CONSTANT && pstringout->dol.value.value!=0.0 ){
sprintf(pstringout->val,"%-14.7g",pstringout->dol.value.value);
if (pstringout->dol.type == CONSTANT){
if (pstringout->dol.value.value!=0.0 ){
sprintf(pstringout->val,"%-14.7g",pstringout->dol.value.value);
}
pstringout->udf=FALSE;
}
if( pdset->init_record ) {
@@ -151,7 +153,7 @@ static long process(paddr)
pstringout->nsev = VALID_ALARM;
pstringout->nsta = LINK_ALARM;
}
}
} else pstringout->udf=FALSE;
}
}