logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

comedi_from_phys - convert physical units to sample

Authors

DavidSchleef <ds@schleef.org>
           Author.

       FrankMoriHess <fmhess@users.sourceforge.net>
           Author.

       HermanBruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
           Author.

       BerndPorr <tech@linux-usb-daq.co.uk>
           Author.

       IanAbbott <abbotti@mev.co.uk>
           Author.

       ÉricPiel <piel@delmic.com>
           Author.

Description

       Converts parameter data given in physical units (double) into sample values (lsampl_t, between 0 and
       maxdata). The parameter range represents the conversion information to use, and the parameter maxdata
       represents the maximum possible data value for the channel that the data will be written to. The mapping
       between physical units and raw data is linear and assumes that the converter has ideal characteristics.

       Conversion is not affected by out-of-range behavior. Out-of-range data parameters are silently truncated
       to the range 0 to maxdata.

Name

       comedi_from_phys - convert physical units to sample

Synopsis

#include<comedilib.h>lsampl_tcomedi_from_phys(doubledata,comedi_range*range,lsampl_tmaxdata);

See Also