EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ao record convert overflow
From: "Schoeneburg, Bernd" <[email protected]>
To: [email protected]
Date: Fri, 20 Mar 2015 13:49:19 +0100
Sorry, a little mistake in my post: Must be '-' instead of '+':

diff -r1.2 -r1.4
22a23
> #include <limits.h>
466,467c467,473
<     if (value >= 0.0)
<         prec->rval = (epicsInt32)(value + 0.5) - prec->roff;
---
>     if (value >= 0.0) {
>         value -= (double)prec->roff - 0.5;
>         if (value > (double)LONG_MAX)
>            prec->rval = LONG_MAX;
>         else
>            prec->rval = (epicsInt32)value;
>     }

Bernd


References:
ao record convert overflow Schoeneburg, Bernd

Navigate by Date:
Prev: ao record convert overflow Schoeneburg, Bernd
Next: EPICS Meeting at FRIB Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ao record convert overflow Schoeneburg, Bernd
Next: Re: ao record convert overflow Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·