|
Subject: |
bug in recCompress.c |
|
From: |
"F. Gougnaud" <[email protected]> |
|
Date: |
Mon, 13 Feb 95 14:39:42 GMT |
Hi,
I have corrected a bug in the recCompress.c file in EPICS release 3.11.
The AVERAGE algorithm doesn't work when the N field is greater than 1 (!)
because the routine array_average() doesn't update the INX record's field.
The routine must be modified like this:
...
/* do we need to calculate the result */
inx++;
if (pcompress->n<=0) pcompress->n=1;
n = pcompress->n;
pcompress->inx = inx; <---- add this line
if (inx<n) return(1);
if (n>1) {
pcompress->inx = 0; <---- and this line
psum = (double *)pcompress->sptr;
multiplier = 1.0/((double)n);
for (i = 0; i < nuse; i++, psum++)
*psum = *psum * multiplier;
}
put_value(pcompress,pcompress->sptr,nuse);
return(0);
A suggestion for the compress record type:
in 3.11 it's not possible to modify the N field of a compress record from
an application. For that, the N field definition in the compressRecord.ascii
file need to be changed like this:
(before) "N to 1 Compression" N SPC_NOMOD DBF_ULONG ...
(after) "N to 1 Compression" N SPC_RESET DBF_ULONG ...
Yves Lussignol.
- Navigate by Date:
- Prev:
Re: Making releases Noboru Yamamoto
- Next:
Re: bug in recCompress.c Rozelle Wright
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
- Navigate by Thread:
- Prev:
Re: Making releases Alan K Biocca
- Next:
Re: bug in recCompress.c Rozelle Wright
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
|